FontRepository

FontRepository

Overview

FontRepository is a class in Aspose.PDF FOSS for .NET.

Provides access to fonts available for use in PDF documents.

This class declares 10 methods for FontRepository objects in .NET programs. Available methods include: FindFont, FontRepository, LoadFonts, OpenFont, ReloadFonts. Public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package. Properties: Sources, Standard14Names, Substitutions.

Properties

NameTypeAccessDescription
SourcesFontSourceCollectionReadThe collection of font sources used for font resolution.
SubstitutionsFontSubstitutionCollectionReadUser-supplied font substitutions.
Standard14NamesIReadOnlyList<string>ReadThe 14 standard PDF font names (PDF32000_2008 §9.6.2.2).

Methods

SignatureDescription
FontRepository()Creates a font repository instance; all of its members are static, so an instance is not needed to use them.
FindFont(fontName: string)Find a font by name.
FindFont(fontFamilyName: string, stl: FontStyles)Find a font by family name and style.
FindFont(fontFamilyName: string, stl: FontStyles, ignoreCase: bool)Find a font by family name and style with optional case-insensitive matching.
FindFont(fontName: string, ignoreCase: bool)Find a font by name with optional case-insensitive matching.
OpenFont(fontFilePath: string)Open a font from a file path.
OpenFont(fontFilePath: string, metricsFilePath: string)Open a Type 1 font from a pair of .pfb + .afm files.
OpenFont(fontStream: System.IO.Stream, fontType: FontTypes)Open a font from a stream of TrueType (TTF) or OpenType (OTF) data.
LoadFonts()Force the font sources to enumerate available fonts.
ReloadFonts()Reset the source collection to its default state (a single SystemFontSource).

See Also

 English