Skip to content

Define notehead attachment points separately

Owen Lamb requested to merge dev/lamb/update-encodingdefs into master

This commit is part of the work done for Google Summer of Code 2020.

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 encodingdefs.ps has been updated accordingly. A convert rule has been written to update the glyphnames in older scores. Relevant regtests and documentation scores have been updated as well (although full docs on changes themselves will be introduced in a later commit).

(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