-
Notifications
You must be signed in to change notification settings - Fork 448
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
Problem with OpenType bitmap font (Ambrosia.otb) #684
Comments
|
Here's a document w.r.t. bitmap-only SFNTs. https://fontforge.github.io/bitmaponlysfnt.html The X11 proposal is probably dead – it was suggested by Juliusz Chroboczek, cf. https://www.irif.fr/~jch//software/xfree86-bitmap-fonts.html but obviously never adapted. IIRC, other people have added a single |
Thanks for the links. Basically, if we exclude the So, if I'm correct, we want fonttools to assert that |
Note that I suggest that ttx can read OTB files but not write. And yes, for writing bitmap-only SFNT fonts I suggest that you add a |
you mean, we should allow to decompile empty glyf tables (such as in OTB files), but then when we compile them back we should automatically add a .notdef glyph? I think the user should fix the latter. |
Exactly. Perhaps it would help if ttx emits a message that OTBs are dead. |
Right now fonttools is not in the business of enforcing anything on this level. I think it should stay that way. |
OK, then this font should rejected with a proper error message. |
I'd say it is not! With the recent release of Pango 1.44, it is practically the only way to distribute bitmap fonts on linux.
At least Harfbuzz, FreeType, and FontForge support it. Probably other projects do too. It is true that it took quite some time to go from BDF to PCF to OTB, but we do seem to be getting there. |
I think the empty |
* Rename last to pos, and next to nextPos * make sure nextPos is initialized, to avoid UnboundLocalError on an empty glyf table, partially addressing #684
Fixing the UnboundLocalError reveals that there's a lot of code in fonttools that assumes I have a rough patch that allows that assumption to be broken, but I tend to agree with @khaledhosny that the loca/glyf tables should simply not be there. To allow this font to be dumped requires a small change to |
… from the glyph order) when writing to XML. Partially addresses fonttools#684.
Basically, just EBLC/EBDT and head, hhea, hmtx should be enough. "Empty" If each size of a font goes into its own OT face, it's easy. Multiple of those can be combined in the same TTC file. This should work just fine with fontconfig / Pango. If multiple bitmap sizes are to go into the same OT face, that becomes more problematic as the hmtx table can represent extents of one only. It's not an issue for monospace fonts, but probably will be for others. |
Basically, just EBLC/EBDT and head, hhea, hmtx should be enough.
"Empty" `glyf/loca` is wrong to me.
Indeed, I recommend at least a (scalable) `.notdef' glyph.
If each size of a font goes into its own OT face, it's easy.
Multiple of those can be combined in the same TTC file. This should
work just fine with fontconfig / Pango.
Yep.
If multiple bitmap sizes are to go into the same OT face, that
becomes more problematic as the hmtx table can represent extents of
one only. It's not an issue for monospace fonts, but probably will
be for others.
I agree. While hmtx values can be scaled easily, this is not the case
for bitmaps. Thus having different OT faces, you can select the
bitmap font at the right pixel size, and you should get good visual
results.
Werner
|
) [ttLib] Allow the glyf table to be incomplete (to not contain everything from the glyph order) when writing to XML. This partially addresses #684 in that it will allow the font Ambrosia.otb to be dumped with ttx (but not recompiled). Log a warning when a glyph is not present.
This zipped SFNT bitmap-only font, created a long time ago by George Williams with FontForge, can't be correctly disassembled with current git (1eba7b3).
I get (with paths shortened for readability)
The
glyf
table is empty, and ttx doesn't like this while assembling.I don't know whether such a font without any data in the
glyf
table is supported except by FreeType, however, ttx should either support it or cleanly reject it.The text was updated successfully, but these errors were encountered: