ots
ots copied to clipboard
Support bitmap fonts (EBDT, EBLC)
In deciding to not support bitmap fonts at all, OTS completely ignores many cultures and the ability to write crisp small print: Furthermore, it may be needed for designers to use crisp rendering for stylish purposes as well. As a major part of our web experience, OTS should look to support all languages and styles evenly!
I won’t have time to work on this, but patches are welcome. Browsers can also ask OTS tp pass-though these tables and this wouldn’t need any changes to OTS, but someone will have to ask browsers to do it.
I can patch this in, if it still needs doing.
Contributions are always welcome.
I made a Code Relay task for this https://github.com/code-relay-io/ots/blob/main/README.md . It will get done.
In on this. Don't want to be stuck to Firefox forever.
@ra-om We're on the ebdt branch right now. https://github.com/code-relay-io/ots/tree/ebdt You can jump right in.
@mmulet I was wondering whether you found this issue the same way I found it. Then I looked back at where I found it and saw you created it. :P
@mmulet how's the work going? It would be great if OTS finally supported this =)
Code Relay has been on pause for a year and half (although we've been been attempting to restart it since January). Agreed that this one should really get done, so I think I will have to do it myself. I looked at the problem a few years ago and I believe that with copilot/gpt-4 these days, it shouldn't take too long. Depending on how much free time I have, I think finishing during this summer would be realistic. (Side note: Are you the pomax of the bezier primer? If so, I just want to say that the primer is a goldmine of information and you have my heartfelt thanks for making it.)
I am, always good to know it's been useful.
Here is an update because it's been about 6 months and past my summer estimate.
This issue has been on my todo list, but life and work keep on getting in the way. This issue keeps on getting pushed back further and further on my list. At this rate, I estimate I will be finished by the end of January.
Sorry for the delay!
I have the first draft of the EBDT, EBLC, and EBSC validators implemented.
If anyone has any fonts that use these tables, please share them here or send me an email. I'm looking for some real fonts that use these tables, so I can test the validators against them. So far, I've found that font forge will output ebdt/etc tables, and of course I can hand create some fonts or convert from bdf, but I would prefer to test against fonts in real use. It's been a little hard to find ebdt fonts because there is a lot of overlap with bdf/etc fonts when I search for "bitmap fonts".
The Windows Korean Supplemental fonts have some EBDT fonts.
batang.ttc
and gulim.ttc
both have TTFs inside with EBDT.
So if you extract the TTC files, you will have eight TTF files with EBDT.
Some of the other CJK TTC files may also TTFs with EBDT, but you will have to check.
Edit: Actually, this was a bug. The fact that Microsoft has a workaround for this font seems to be a strange coincidence.
~~On my validator, batang.ttc fails to validate because it uses variable metrics image formats in the EBDT while using constant metric index formats in the EBLC table~~ ~~Looking at the spec, it's unclear if this is allowed or disallowed.~~
~~I tried looking at other validators to see what they do, I found that Microsoft's font validator specifically ignores this issue just for batang.ttc~~
microsfot/Font-Validator/OTFFontFile/Table_EBDT.cs#L235:
// These images all have the same metrics as described in the indexSubTable so should have the proper image format
// Debug.Assert( nIndexFormat != 2 && nIndexFormat != 5 );
// commented out the above assert because batang.ttc violates this too much
~~So, if there are no objections here, I'm okay with allowing this (metrics in both EBLC and EBDT) in the validator.~~
MS Mincho (msmincho.ttc) also has EBDT in the two TTF fonts. In the Windows Japanese Supplemental Fonts Pack.
Did not find any others with EBDT in the other CJK fonts.
MS Mincho (msmincho.ttc) also has EBDT in the two TTF fonts. In the Windows Japanese Supplemental Fonts Pack.
Did not find any others with EBDT in the other CJK fonts.
mcmincho.ttc, uses a different bitmap format and a different embedded bitmap location format. So, that is a really good find.
I've created a list of all tested fonts and formats in the pull request: #273
Found a few more with EBDT
Windows 11 standard fonts
- lucon.ttf (Lucida Console)
- msgothic.ttc
- simsun.ttc
- simsunb.ttf
Windows 95 standard font - MSSONG.TTF Thought this may now be in one of the newer TTC files, but did not find it.