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
| Name | Type | Access | Description |
|---|---|---|---|
offsets | list[int] | Read/Write | Gets or sets the offsets. |
Methods
| Signature | Description |
|---|---|
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) → bytes | Serializes the Loca table to bytes according to the given index_to_loc_format |
glyph_offset(gid: int) → int | Returns the byte offset of the glyph data for the given glyph ID within the font’s glyf table |
glyph_length(gid: int) → int | Returns the byte length of the glyph data for the given gid |