GlyphAccessor
Overview
GlyphAccessor is a class in Aspose.Font FOSS for Python.
Inherits from: ABC.
Retrieves glyphs by ID or Unicode codepoint.
This class provides 5 methods for working with GlyphAccessor objects in Python programs.
Available methods include: __init__, get_all_glyph_ids, get_glyph_by_id, get_glyph_by_unicode, get_glyphs_for_text.
All public members are accessible to any Python application after installing the Aspose.Font FOSS for Python package.
Methods
| Signature | Description |
|---|---|
__init__(encoding: FontEncoding) | Calls init on this GlyphAccessor instance. |
get_glyph_by_id(gid: GlyphId) → Glyph | Retrieves the Glyph object that matches the supplied GlyphId |
get_glyph_by_unicode(codepoint: int) → Glyph | Returns a Glyph object containing glyph_id, glyph_name, path, advance_width, and lsb for the given Unicode codepoint |
get_glyphs_for_text(text: str) → list[Glyph] | Returns a list of Glyph objects representing each character in the provided text |
get_all_glyph_ids() → list[GlyphId] | Returns the all glyph ids. |