Closed dy closed 1 year ago
I don't think mergefonts
is the right tool for this at the moment. It sounds like it should do what you want, but it could use some updates for variable fonts for sure. There are other tools like fontTools merge
which are more up to date with this kind of merging, but I tried that and it also failed. AdobeBlank is an unusual font in the first place so that's probably part of the issue. However, it's really a simple font. The binary GSUB and cmap don't really matter. There's nothing in the GSUB and the cmap is just scripted to point every codepoint to the single glyph. I did a quick test that I think does what you want.
ttx -t cmap wavefont.otf
ttx -t cmap AdobeBlank2VF.otf
The AdobeBlank cmap will point to uni0000
for everything, but you want to use what's in wavefont already so replace all uni0000
with _0
. Then copy the entries from the wavefont cmap format 4 and paste them at the very end of the AdobeBlank cmap format 13.
Then run
ttx -m wavefont.otf updated-cmap.ttx
and you should have a format 13 where everything points to _0
except for what you want mapped to the wavefont glyphs.
I'm trying to merge wavefont over AdobeBlank2 to make wavefont last-resort font, mapping any chars out of range to blank.
But the resutling font is seemingly corrupted:
I wonder if that use-case is something the program is capable of? Do I have to specify glyph map maybe?
If that's impossible with
mergefonts
- I'd like to ask for advice what would be the good way to make such filling all chars with blanks? I tried reproducing method from Adobe Blank - patching the tables, but I don't understand where the binary chunks forcmap
/gsub
are coming from and how to properly modify them / regenerate for wavefont with changed subranges. That doesn't seem to be possible via feature-file, does it?Thanks for any help...