- class neoscore.core.has_music_font.HasMusicFont
A mixin for classes which have an associated staff measurement.
This is useful for integration with SMuFL fonts, where glyphs and their metadata are measured relative to a staff space.
A naive and slow implementation of the
music_fontproperty is provided which returns the nearest music found in the object’s ancestors. Subclasses will often want to override this.
- static find_music_font(obj: PositionedObject) MusicFont
Return the music font from
objor its nearest ancestor with one.
objand then its ancestors for whether they have a
music_fontattribute, returning the first value found. If no font is found, this raises a