Skip to content

Define notehead attachment points separately

Owen Lamb requested to merge dev/lamb/split-attachment-points into master

SMuFL requires that two stem attachment points be explicitly defined for each notehead glyph--one for upward stems and one for downward stems. This commit prepares for that requirement by defining two attachment points for every Emmentaler character. If not specified, the downwards point is calculated by rotating the upwards point around the center of the glyph.

Accordingly, Lily now reads from either point as needed instead of calculating the downwards point at runtime.

Because of this change, Emmentaler no longer needs to distinguish stem direction for some noteheads (triangle, do, re, and ti) where the only difference between the variants was their attachment points. These 'u'/'d' pairs have been merged into single 's' glyphs, and a convert rule has been written to update the names in older scores.

(Tablature stem attachment points were previously hardcoded as (0.0 . 1.35). Now that runtime calculation of downward stems is gone, tab noteheads' stem attachment points are determined by a new function, ly:notehead::calc-tab-stem-attachment, which picks the appropriate choice out of (0.0 . -1.35) and (0.0 . 1.35).)

Edited by Owen Lamb

Merge request reports