Closed satbyy closed 2 years ago
Font merging succeeds with fonttools/fonttools#2473 when Noto Sans Regular is the first argument and vmtx is dropped explicitly (with Nandinagari as first argument, fails with above error):
fonttools merge --verbose --drop-tables+=vhea,vmtx \
NotoSans-Regular.ttf NotoSansNandinagari-Regular.ttf
Merging 'cmap'.
Merged 'cmap'.
Merging 'GSUB'.
Merged 'GSUB'.
Merging 'cvt '.
Merged 'cvt '.
Merging 'maxp'.
Merged 'maxp'.
Merging 'DSIG'.
Don't know how to merge 'DSIG'.
Dropped 'DSIG'.
Merging 'name'.
Merged 'name'.
Merging 'post'.
Merged 'post'.
Merging 'gasp'.
Merged 'gasp'.
Merging 'GPOS'.
Merged 'GPOS'.
Merging 'prep'.
Merged 'prep'.
Merging 'hmtx'.
Merged 'hmtx'.
Merging 'STAT'.
Don't know how to merge 'STAT'.
Dropped 'STAT'.
Merging 'OS/2'.
Merged 'OS/2'.
Merging 'gasp'.
Merged 'gasp'.
However, the resulting glyphs of combining characters are shifted to the right and not to the attached to the base consonant:
Test sequence: 𑦮𑧖𑧌𑧠𑦼
When I try it, both NotoSansNandinagari-Regular.ttf and merged.ttf produce this output.
[Ka.Nnagari=0+848|MatraR.Nnagari=0@-273,0+0|SsaNna.Nnagari=2+725]
That’s different from the expected output in your last comment. How did you generate that image?
@dscorbett Ah, I just tried it in Libreoffice. Yours is certainly correct. It is very similar to Devanagari कृष्ण (as it should be). Which application did you use?
I used hb-view, HarfBuzz’s viewing utility. It should work in anything that uses HarfBuzz, including Chrome, Firefox, and LibreOffice.
It seems that the cached Dogra font in git repo (cached_fonts/NotoSerifDogra-Regular.ttf
) can be removed once fonttools/fonttools#2473 is resolved. Otherwise, it currently displays the same error msg as above for Nandinagari.
Hmm. I was too quick in closing the issue.
Currently fonttools doesn't support merging when one of the inputs has different tables not present in the other. In the following example, NotoSans-Regular doesn't have
vmtx
.Above is with fonttools 4.28.3