neoscore.core.glyph_info

class neoscore.core.glyph_info.GlyphInfo[source]

Bases: object

SMuFL glyph metadata.

canonical_name: str

The canonical glyph name, e.g. ‘gClefFlat1Below’

codepoint: str

The glyph as a unicode string, e.g. '\uF55D'

description: str

Short description of glyph, e.g. ‘G clef, flat 1 below’

__init__(canonical_name: str, codepoint: str, description: str, bounding_rect: Optional[Rect], advance_width: Optional[Unit], anchors: Optional[Dict[str, Point]]) None
bounding_rect: Optional[Rect]

Glyph bounding rect from SMuFL metadata.

Note that this is not always very accurate. If accurate measurements are needed, it’s better to query the font with Font.bounding_rect_of.

advance_width: Optional[Unit]

The typographic advance distance specified for the glyph.

anchors: Optional[Dict[str, Point]]

A collection of anchor points provided by SMuFL metadata.

See SMuFL’s docs on anchors. Note that, while SMuFL provides anchors in a vertically inverted coordinate system, they are automatically translated to neoscore’s coordinates here.