Fonts

Vue de l’ensemble

‘Font’ est une classe dans Aspose.PDF FOSS pour .NET. hérite de: ‘Contact’.

Type alias pour FontInfo, correspondant au nom de classe Font.

Cette classe fournit 5 méthodes pour travailler avec des objets de Font dans les programmes .NET. Les méthodologies disponibles comprennent: ‘FromFontData’, ‘GetGlyphWidth’, GatLastFonEmbeddingError', ‘MeasureString’, 'Save'. Tous les membres publics sont accessibles à n'importe quelle application .Net après l'installation du Aspose.PDF FOSS pour le package .net. Propriétés: BaseFonte’, ‘‘DecodedFontaineName’,‘‘DefaultHelvetica’,`Encoding’, ‘’FoncteNome’,’’Options’ et 10 autres.

Propriétés

NameTypeAccessDescription
BaseFontstringReadGets the base font.
FontNamestringReadGets the font name.
DecodedFontNamestringReadGets the decoded font name.
IsEmbeddedboolRead/WriteGets or sets the is embedded.
IsSubsetboolRead/WriteGets or sets the is subset.
IsAccessibleboolReadGets the is accessible.
FontOptionsIFontOptionsReadGets the font options.
iPdfFontPdfFontViewReadLower-level PDF-font view of this Font.
DefaultHelveticaFontReadDefault Helvetica font for detached text fragments.
ResourceNamestringReadResource name in the page’s font dictionary (e.g., “F1”).
UniqueIdstringReadUnique identifier combining resource name and base font.
SubtypestringReadFont subtype (Type1, TrueType, Type0, Type3, etc.).
Encodingstring?ReadEncoding name (WinAnsiEncoding, Identity-H, etc.).
IsItalicboolReadWhether the font is italic.
IsBoldboolReadWhether the font is bold.
IsCidboolReadWhether the font is a CID (Type0) font — used for Arabic, CJK, etc.

méthodes

SignatureDescription
GetLastFontEmbeddingError()Last error encountered embedding this font in a PDF; empty when none.
MeasureString(str: string, fontSize: float)Measure the rendered width of a string at the given size, in points.
Save(stream: System.IO.Stream)Write the raw font file data to a stream.
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.

Voir aussi

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