EotFont

Overview

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

Embedded OpenType (EOT) wrapper over an inner TrueType/OpenType font.

This class provides 14 methods for working with EotFont 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: charset, encoding, eot_version, flags, font_family, font_name, and 9 more.

Properties

NameTypeAccessDescription
font_typeFontTypeReadGets the font type.
inner_fontTtfFontReadGets the inner font.
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.
eot_versionintReadGets the eot version.
flagsintReadGets the flags.
charsetintReadGets the charset.
italicintReadGets the italic.
weightintReadGets the weight.
fs_typeintReadGets the fs type.

Methods

SignatureDescription
__init__(inner: TtfFont, eot_version: int, flags: int, charset: int, italic: int, weight: int, fs_type: int)Create an EOT wrapper around an inner sfnt font.
get_kern_pairs()list[KernPair]Returns the kern pairs.
to_bytes(font_type: FontType | None)bytesSerialize this font as EOT bytes or delegate cross-format conversion.
font_type()FontTypeReturns the FontType enumeration value of this EOT font
font_name()strProperty contains the font’s name string
font_family()strProperty contains the font family name string
font_style()strReturns the style descriptor (e.g., Regular, Bold) as a string
num_glyphs()intProperty stores the total glyph count of the font
metrics()FontMetricsProperty holds a FontMetrics object with metric data for the font
encoding()FontEncodingProperty holds a FontEncoding object describing the font’s encoding
glyph_accessor()GlyphAccessorCalls glyph_accessor on this EotFont instance.
save(path: str)Writes the EOT font to the file system at the specified path
save_to_format(font_type: FontType, path: str)Converts the font to the given FontType and saves it to the path
convert(target: FontType)FontCreates and returns a new Font object of the specified target FontType

See Also