class neoscore.core.music_char.MusicChar[source]

Bases: object

A SMuFL music character.

Note that measurements in the contained metadata may have slight errors and should be used with caution when high precision is needed.

font: MusicFont

The font used to derive SMuFL spec information about this glyph.

glyph_name: str

The canonical SMuFL name of the glyph

alternate_number: Optional[int] = None

An SMuFL alternate glyph code, if applicable.


SMuFL metadata for this character

__init__(font: MusicFont, glyph_name: str, alternate_number: Optional[int] = None) None
property codepoint: str

The glyph’s SMuFL codepoint.

This is a convenience property for glyph_info.codepoint

property bounding_rect: Rect

The glyph bounding box.


Shorthand for a MusicChar.

Bare str values should be glyph names, while tuples should be of the form (glyph_name, alternate_number)

alias of Union[MusicChar, str, Tuple[str, int]]