LocaTable

Overview

LocaTable is a class in Aspose.Font FOSS for Python.

LocaTable.glyph_offset(gid) returns the byte offset of the glyph data for the given glyph ID within the font’s glyf table.

This class provides 4 methods for working with LocaTable objects in Python programs. Available methods include: from_reader, glyph_length, glyph_offset, to_bytes. All public members are accessible to any Python application after installing the Aspose.Font FOSS for Python package. Properties: offsets.

Properties

NameTypeAccessDescription
offsetslist[int]Read/WriteGets or sets the offsets.

Methods

SignatureDescription
from_reader(r: BinaryReader, num_glyphs: int, index_to_loc_format: int, table_length: int)"LocaTable"Reads a Loca table from a BinaryReader using glyph count, format and length
to_bytes(index_to_loc_format: int)bytesSerializes the Loca table to bytes according to the given index_to_loc_format
glyph_offset(gid: int)intReturns the byte offset of the glyph data for the given glyph ID within the font’s glyf table
glyph_length(gid: int)intReturns the byte length of the glyph data for the given gid

See Also