WoffFont

Overview

WoffFont is a class in Aspose.Font FOSS for Python. Inherits from: Font.

WoffFont.font_type returns the FontType enumeration value of this WOFF font.

This class provides 14 methods for working with WoffFont objects in Python programs. Available methods include: __init__, convert, encoding, font_family, font_name, font_style, font_type, get_kern_pairs, glyph_accessor, metrics, num_glyphs, save, and 2 additional methods. All public members are accessible to any Python application after installing the Aspose.Font FOSS for Python package. Properties: encoding, font_family, font_name, font_style, font_type, glyph_accessor, and 4 more.

Properties

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.

Methods

SignatureDescription
__init__(inner: TtfFont, metadata_xml: str)Calls init on this WoffFont instance.
get_kern_pairs()list[KernPair]Returns the kern pairs.
to_bytes(font_type: FontType | None)bytesCalls to_bytes on this WoffFont instance.
font_type()FontTypeReturns the FontType enumeration value of this WOFF font
font_name()strProperty provides the font’s name string
font_family()strProperty provides the family name string of the font
font_style()strCalls font_style on this WoffFont instance.
num_glyphs()intProperty returns the count of glyphs in the font
metrics()FontMetricsProperty returns the FontMetrics object for the font
encoding()FontEncodingCalls encoding on this WoffFont instance.
glyph_accessor()GlyphAccessorReturns a GlyphAccessor for retrieving glyph information
save(path: str)Calls save on this WoffFont instance.
save_to_format(font_type: FontType, path: str)Calls save_to_format on this WoffFont instance.
convert(target: FontType)FontCalls convert on this WoffFont instance.

See Also