satbyy / go-noto-universal

Noto fonts go universal! Download pan-Unicode, merged Noto fonts according to time of usage (current, ancient) or geographical region (South Asia, SE Asia, Africa-MiddleEast, Europe-Americas).
Other
157 stars 22 forks source link

Mark classes and mark sets are not merged correctly #3

Closed dscorbett closed 2 years ago

dscorbett commented 2 years ago

Fonts with lookups that use mark classes or mark sets are not merged correctly. If, say, a lookup in a source font uses mark set 0, the corresponding lookup in the merged font will also use mark set 0, even though the merged font’s mark set 0 might come from a different source font.

For example, here is <U+11C72, U+11C92, U+11C93> in Go Noto East Asia: 𑱲𑲒𑲓 And here it is in Noto Sans Marchen: 𑱲𑲒𑲓

satbyy commented 2 years ago

Interesting bug! Probably it's related to this note in nototools :

  1. The line metrics in the final merged font are substituted by those in NotoSans-Regular.ttf (LGC). This is to optimize the user experience in LGC. The drawback is some tall scripts in the file list (like Balinese, Cuneiform, Javaness) might vertically overlap with each other and also be clipped by the edge of the UI. This should be handled carefully by the UI designer, say changing the line height or adding the margin.

I get the same results with bare pyftmerge. So probably reporting to fonttools/fonttools might be better.

EDIT: Yes, my guess was correct. As can be seen from merge_noto.py it hard-codes the line metrics from valid_files[0] which happens to be Noto Sans Regular. Changing the order of files[ ] like this to have Marchen first:

files = [
    "NotoSansMarchen-Regular.ttf",
    "NotoSans-Regular.ttf", ]

gives correct result as expected: image

dscorbett commented 2 years ago

It is fonttools/fonttools#1260. It’s not related to line metrics.