-
Notifications
You must be signed in to change notification settings - Fork 475
pyftmerge breaks fonts that support the same character #2475
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
Comments
The way this is supposed to work in the merger, and given that you don't get a warning, is that, since the two scripts use different script tags, the merger adds GSUB rules to one of the scripts to map one glyph to the other in one of those scripts. But I cannot make it work.... 2 hours later... okay found the bugs. PR coming. |
Part of fixing #2475 Old code was mistakenly only adding the synthetic-generated feature to the first language-system. In the case of merging Noto Grantha and Noto Tamil fonts, Noto Tamil had two script systems: 'taml' and 'tml2', and we were adding the synthetic 'locl' feature only to the DefaultLangSys of the 'taml' script, not the 'tml2' script. That was the main bug. A second issue was that the lookup was being added twice to the same (synthetic) feature. Check before adding lookup, to avoid that.
This was removing semantically-significant difference amongst glyphs such as two identical glyphs one in Noto Sans Tamil one in Noto Sans Grantha as in the following issue: Part of fixing #2475
With that PR:
|
I like to move towards this if the glyphs have identical rendering (in this case they do). One issue with it is that some of our lookup representations need reshuffling if glyph order changes. However, I think we can ignore that since our |
Thanks! PR #2476 fixes this issue for Tamil/Grantha with test string ப்பிபீபுபூவு. Both cases are rendered identically (as expected) |
Part of fixing #2475 Old code was mistakenly only adding the synthetic-generated feature to the first language-system. In the case of merging Noto Grantha and Noto Tamil fonts, Noto Tamil had two script systems: 'taml' and 'tml2', and we were adding the synthetic 'locl' feature only to the DefaultLangSys of the 'taml' script, not the 'tml2' script. That was the main bug. A second issue was that the lookup was being added twice to the same (synthetic) feature. Check before adding lookup, to avoid that.
This was removing semantically-significant difference amongst glyphs such as two identical glyphs one in Noto Sans Tamil one in Noto Sans Grantha as in the following issue: Part of fixing #2475
Part of fixing #2475 Old code was mistakenly only adding the synthetic-generated feature to the first language-system. In the case of merging Noto Grantha and Noto Tamil fonts, Noto Tamil had two script systems: 'taml' and 'tml2', and we were adding the synthetic 'locl' feature only to the DefaultLangSys of the 'taml' script, not the 'tml2' script. That was the main bug. A second issue was that the lookup was being added twice to the same (synthetic) feature. Check before adding lookup, to avoid that.
This was removing semantically-significant difference amongst glyphs such as two identical glyphs one in Noto Sans Tamil one in Noto Sans Grantha as in the following issue: Part of fixing #2475
Merging fonts sometimes doesn’t work when the source fonts support the same non-common-script character. This happens both with 4.28.4 and with 4.28.4 plus #2473 (as of that PR’s commit
8a76455
).If the Tamil font comes first, the glyph is
patamil
. If the Grantha font comes first, the glyph ispa_tamil
, which breaks any Tamil lookups that expectpatamil
. Both fonts include both glyphs, but each font only ever uses one of the glyphs.A solution might be to canonicalize the glyphs to a single glyph. For example, if Noto Sans Grantha is specified first, the canonical glyph would be
pa_tamil
.patamil
would be discarded entirely and anything in Noto Sans Tamil that refers topatamil
would be changed to refer topa_tamil
.The text was updated successfully, but these errors were encountered: