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
| Name | Type | Access | Description |
|---|---|---|---|
font_type | FontType | Read | Gets the font type. |
font_name | str | Read | Gets the font name. |
font_family | str | Read | Gets the font family. |
font_style | str | Read | Gets the font style. |
num_glyphs | int | Read | Gets the num glyphs. |
metrics | FontMetrics | Read | Gets the metrics. |
encoding | FontEncoding | Read | Gets the encoding. |
glyph_accessor | GlyphAccessor | Read | Gets the glyph accessor. |
metadata_xml | str | Read | Gets the metadata xml. |
inner_font | TtfFont | Read | Gets the inner font. |
Methods
| Signature | Description |
|---|---|
__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) → bytes | Calls to_bytes on this WoffFont instance. |
font_type() → FontType | Returns the FontType enumeration value of this WOFF font |
font_name() → str | Property provides the font’s name string |
font_family() → str | Property provides the family name string of the font |
font_style() → str | Calls font_style on this WoffFont instance. |
num_glyphs() → int | Property returns the count of glyphs in the font |
metrics() → FontMetrics | Property returns the FontMetrics object for the font |
encoding() → FontEncoding | Calls encoding on this WoffFont instance. |
glyph_accessor() → GlyphAccessor | Returns 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) → Font | Calls convert on this WoffFont instance. |