Created attachment 465513 [details] Test case The attached test case contains a version of the Ahem font with two new layout features, `cv01` and `XPOS`, identical except for their tags. The features contain a single rule (in afdko feature syntax): pos x <500 0 1000 0>; That is, modify the x glyph by increasing the xPosition by 500 font units and the advance by 1000 font units, effectively adding a half em of space on both sides of the glyph. In the attached index.html, the two lines of text are identical, except in the first the middle character is wrapped with a span that activates the cv01 feature, and in the second the middle character is wrapped with a span that activates the XPOS feature. The glyph's position is modified only in the first line. STEPS TO REPRODUCE Open the index.html in the attached archive. You do not need to run the Makefile; it and the UFO sources are attached for reference. The features can be found in Ahem-Regular.ufo/features.fea. EXPECTED RESULTS The two lines of text are identical. Observed in STP 165 and Safari 16.3 (18614.4.6.1.6) running on macOS 13.2.1 (22D68). Does not reproduce in Firefox 111 and Chrome 111. COMMENTARY I ran into this issue while implementing a feature that modified spacing for some punctuation characters, similar to the "PKRN" example Microsoft gives on https://learn.microsoft.com/en-us/typography/opentype/spec/featuretags. WORKAROUND Use one of the stylistic variant tags, like cv01–cv99 or ss01–ss20.
Created attachment 465514 [details] Test case
I can reproduce with ToT.
Looks like the font we're creating doesn't actually have the XPOS feature set 🤔
Looks like we're lowercasing XPOS -> xpos
auto tag = consumeFontTag<FontTagCaseManipulation::ToASCIILower>(range); 🤔
http://w3c.github.io/csswg-drafts/css-fonts-4/#font-feature-settings-prop > The <string> is a case-sensitive OpenType feature tag.
The included font claims to be in the public domain, so I can just make a layout test with it.
<rdar://problem/106966601>
Pull request: https://github.com/WebKit/WebKit/pull/11739
Committed 262463@main (6e7c8de0a165): <https://commits.webkit.org/262463@main> Reviewed commits have been landed. Closing PR #11739 and removing active labels.