Skip to content

Improve SmuFL spec compliance #1949

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Danielku15 opened this issue Mar 16, 2025 · 0 comments
Open

Improve SmuFL spec compliance #1949

Danielku15 opened this issue Mar 16, 2025 · 0 comments
Assignees
Labels
area-rendering Everything related to the rendering platform-all Affects all platforms state-accepted This is a valid topic to work on.
Milestone

Comments

@Danielku15
Copy link
Member

alphaTab currently does not follow the SmuFL specification very well. We use the glyphs from SmuFL fonts, but the whole sizing aspect is either hard-coded or relies on graphical measuring (measureText).

Most music notation software, and also SmuFL define special units, typically based on the five-line staff spacing.

Dividing the em in four provides an analogue for a five-line staff: if a font uses 1000 upm (design units per em), as is conventional for a PostScript font, one staff space is equal to 250 design units; if a font uses 2048 upm, as is conventional for a TrueType font, one staff space is equal to 512 design units.

https://w3c.github.io/smufl/latest/specification/scoring-metrics-glyph-registration.html

In this work item we adjust alphaTab to respect the SmuFL metadata and units accordingly and even allow passing in external metadata for the use of custom fonts.

This should bring following benefits:

  • We can eliminate a lot of the custom spacings and alignment corrections we do in alphaTab.
  • We can introduce mechanisms to place additional "glyph annotations" where alphaTab doens't understand the semantics (e.g used in capella and MusicXML).
  • End users can use custom SmuFL fonts in their apps.
  • The visual display elements is better (e.g no stem overlaps)
@Danielku15 Danielku15 added area-rendering Everything related to the rendering platform-all Affects all platforms state-accepted This is a valid topic to work on. labels Mar 16, 2025
@Danielku15 Danielku15 added this to the 1.5.0 milestone Mar 16, 2025
@Danielku15 Danielku15 self-assigned this Mar 16, 2025
@Danielku15 Danielku15 modified the milestones: 1.5.0, 1.6.0 May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-rendering Everything related to the rendering platform-all Affects all platforms state-accepted This is a valid topic to work on.
Projects
None yet
Development

No branches or pull requests

1 participant