Woff2Font

Vue de l’ensemble

‘Woff2Font’ est une classe dans Aspose.FONT FOSS pour Python.

Woff2Font.to_bytes(font_type) sérialisera la phonture WOFF2 en un objet de bytes pour le type de font spécifié.

Cette classe fournit 14 méthodes pour travailler avec des objets Woff2Font dans les programmes Python. Les méthodologies disponibles comprennent: __init__, convert , ’encodage’, font_family ; font_name; Font_style : font-typeetget_kern_pairs . , glyph_accessor ! , métrique ، num_glyfs. , save ainsi que 2 méthode supplémentaires. Tous les membres publics sont accessibles à toute application Pythone après l’installation de l’Aspose.Fon FOSS pour le pack Pyathone. Propriétés : encodereux, font&families en font, fon_nameen font style, fonctionnalitéd' font type, type_de fontglifyaccesor, 4 plus.

Propriétés

NameTypeAccessDescription
font_typeFontTypeReadGets the font type.
font_namestrReadGets the font name.
font_familystrReadGets the font family.
font_stylestrReadGets the font style.
num_glyphsintReadGets the num glyphs.
metricsFontMetricsReadGets the metrics.
encodingFontEncodingReadGets the encoding.
glyph_accessorGlyphAccessorReadGets the glyph accessor.
metadata_xmlstrReadGets the metadata xml.
inner_fontTtfFontReadGets the inner font.

méthodes

SignatureDescription
__init__(inner: TtfFont, metadata_xml: str)Calls init on this Woff2Font instance.
get_kern_pairs()list[KernPair]Returns the kern pairs.
`to_bytes(font_type: FontTypeNone)bytes`
font_type()FontTypeReturns the FontType of this Woff2Font instance
font_name()strCalls font_name on this Woff2Font instance.
font_family()strProperty holds the font’s family name string
font_style()strProperty holds the font’s style descriptor string
num_glyphs()intProperty holds the total glyph count as an integer
metrics()FontMetricsReturns a FontMetrics object containing the font’s metrics
encoding()FontEncodingProperty holds a FontEncoding instance describing the font’s encoding
glyph_accessor()GlyphAccessorProperty holds a GlyphAccessor for glyph operations
save(path: str)Calls save on this Woff2Font instance.
save_to_format(font_type: FontType, path: str)Calls save_to_format on this Woff2Font instance.
convert(target: FontType)FontReturns a Font object in the requested target format, enabling conversion from a WOFF2 font to any other supported format such as TTF or OTF

Voir aussi

  • Aspose.Font — référence API d’entreprise
 Français