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
| Name | Type | Access | Description |
|---|---|---|---|
DefaultHelvetica | Font | Read | Default Helvetica font for detached text fragments. |
ResourceName | string | Read | Resource name in the page’s font dictionary (e.g., “F1”). |
BaseFont | string | Read | The base font name (e.g., “Helvetica”, “ABCDEF+ArialMT”). |
FontName | string | Read | Normalized font name — strips subset prefix (ABCDEF+) and comma separators. |
DecodedFontName | string | Read | Decoded font name as a human-readable display name. |
UniqueId | string | Read | Unique identifier combining resource name and base font. |
Subtype | string | Read | Font subtype (Type1, TrueType, Type0, Type3, etc.). |
Encoding | string? | Read | Encoding name (WinAnsiEncoding, Identity-H, etc.). |
IsEmbedded | bool | Read/Write | Whether the font is embedded in the PDF. |
IsSubset | bool | Read/Write | Whether the font is a subset (name starts with XXXXXX+). |
IsItalic | bool | Read | Whether the font is italic. |
IsBold | bool | Read | Whether the font is bold. |
IsCid | bool | Read | Whether the font is a CID (Type0) font — used for Arabic, CJK, etc. |
IsAccessible | bool | Read | Whether 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
| Signature | Description |
|---|---|
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