FontInfo

Vue de l’ensemble

‘FontInfo’ est une classe dans Aspose.PDF FOSS pour .NET.

Informations sur un phon utilisé dans un PDF.

Cette classe fournit 3 méthodes pour travailler avec des objets FontInfo dans les programmes .NET. Les méthodologies disponibles comprennent: ‘FromFontData’, ‘GetGlyphWidth’, MeasureString'. Tous les membres publics sont accessibles à n'importe quelle application .Net après l'installation de la FOSS Aspose.PDF pour le package .net. Propriétés: BaseFon’, ‘‘DecodedFonteName, DefaultHelvetica , 'Encoding',''FontaMé', ‘’IsAccessible et 8 autres.

Propriétés

NameTypeAccessDescription
DefaultHelveticaFontReadDefault Helvetica font for detached text fragments.
ResourceNamestringReadResource name in the page’s font dictionary (e.g., “F1”).
BaseFontstringReadThe base font name (e.g., “Helvetica”, “ABCDEF+ArialMT”).
FontNamestringReadNormalized font name — strips subset prefix (ABCDEF+) and comma separators.
DecodedFontNamestringReadDecoded font name as a human-readable display name.
UniqueIdstringReadUnique identifier combining resource name and base font.
SubtypestringReadFont subtype (Type1, TrueType, Type0, Type3, etc.).
Encodingstring?ReadEncoding name (WinAnsiEncoding, Identity-H, etc.).
IsEmbeddedboolRead/WriteWhether the font is embedded in the PDF.
IsSubsetboolRead/WriteWhether the font is a subset (name starts with XXXXXX+).
IsItalicboolReadWhether the font is italic.
IsBoldboolReadWhether the font is bold.
IsCidboolReadWhether the font is a CID (Type0) font — used for Arabic, CJK, etc.
IsAccessibleboolReadWhether the font program is available — either embedded in the PDF, already loaded as source data, or installed on the system under the same name (resolvable via FindFont).

méthodes

SignatureDescription
FromFontData(fontData: FontData)Create a FontInfo from a FontData (system font found via FontRepository.FindFont).
GetGlyphWidth(charCode: int)Get the width of a character code in 1/1000 text space units.
MeasureString(text: string, fontSize: double)Measure the width of a string in points, given a font size.

Voir aussi

  • Aspose.PDF pour .NET — API d’entreprise
 Français