intel / intel-one-mono

Intel One Mono font repository
SIL Open Font License 1.1
9.35k stars 314 forks source link

1.2 regressions for non spacing combining marks #10

Closed moyogo closed 1 year ago

moyogo commented 1 year ago

Version 1.2 removed the ccmp feature lookup DblMarks and lookup CmbMarks that caused #3 but also removed the ccmp feature lookup Dotless and the mark feature block. The ccmp feature lookup Dotless and the mark feature block should not have been removed.

The DblMarks and CmbMarks lookup were wrongly substituting the spacing marks (like ` U+0060 GRAVE ACCENT or ´ U+00B4 ACUTE ACCENT) by non spacing combining marks (like  ̀ U+0300 COMBINING GRAVE ACCENT or  ́ U+0301 COMBINING ACUTE ACCENT). The spacing marks should not behave like non spacing combining marks, they were behaving incorrectly in version 1.0 and are now behaving correctly in version 1.2.

The Dotless lookup ensured i and j were substituted by their dotless forms when combined with a top non spacing combining mark or with a bottom and a top non spacing combining mark. The mark feature ensured the non spacing combining marks are positioned on base letters they combine with. The non spacing combining marks were behaving correctly in version 1.0 and are now behaving incorrectly in version 1.2.

For example, íj́ used in Dutch when the digraph ij has acute marks when indicating stress (i with acute is a single character in Unicode, j with acute is two characters: U+006A LATIN SMALL LETTER J and U+0301 COMBINING ACUTE ACCENT): Version 1.0
(correct íj́, with dotless j
and positioned combining acute)
Version 1.2 (incorrect j́ in íj́)
Screenshot 2023-05-20 at 20 39 19 Screenshot 2023-05-20 at 20 39 11
The ǰ U+01F0 LATIN SMALL LETTER J WITH CARON is also broken in the process as the ccmp still has a lookup substituting jcaron by j caroncmb. Version 1.0
(correct ǰ, with dotless j
and positioned combining caron)
Version 1.2
(incorrect ǰ with j
and mispositioned combining caron)
Screenshot 2023-05-20 at 21 03 55 Screenshot 2023-05-20 at 21 04 14

To fix this, restore the Dotless lookup in the ccmp feature and restore the mark feature. Additionally the Dotless lookup should be extended for the ị LATIN SMALL LETTER I WITH DOT BELOW and į LATIN SMALL LETTER I WITH OGONEK to behave correctly when combining with top marks. The following ccmp feature Dotless lookup, based on https://googlefonts.github.io/gf-guide/diacritics.html#stacked-diacritics, can be used:

# Marks Above
@lcMarks =   [acutecmb     hungarumlautcmb     gravecmb     circumflexcmb     caroncmb     brevecmb     tildecmb     macroncmb     dieresiscmb     dotaccentcmb     ringcmb    ];

# Replace letters with dotless counterparts when followed by a combining mark.
lookup Dotless {
    lookupflag UseMarkFilteringSet @lcMarks;
    sub [i j]' @lcMarks by [dotlessi dotlessj];
    sub idotbelow' @lcMarks by dotlessi dotbelowcmb;
    sub iogonek' @lcMarks by dotlessi ogonekcmb;
} Dotless;
glenda-tn commented 1 year ago

Hello, Adding to this issue: U+1E96, lc h with line below, is using the (spacing) modifier low macron, U+02CD. It should use U+0331, the combining macron below.

IntelOneMono