Skip to content
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

Support bitmap fonts (EBDT, EBLC) #200

Open
o5k opened this issue Oct 8, 2019 · 19 comments
Open

Support bitmap fonts (EBDT, EBLC) #200

o5k opened this issue Oct 8, 2019 · 19 comments

Comments

@o5k
Copy link

o5k commented Oct 8, 2019

In deciding to not support bitmap fonts at all, OTS completely ignores many cultures and the ability to write crisp small print:
Japanese print in Bitmap and vector
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!

@khaledhosny
Copy link
Owner

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.

@mmulet
Copy link

mmulet commented Mar 11, 2021

I can patch this in, if it still needs doing.

@khaledhosny
Copy link
Owner

khaledhosny commented Mar 12, 2021 via email

@mmulet
Copy link

mmulet commented Mar 19, 2021

I made a Code Relay task for this https://github.com/code-relay-io/ots/blob/main/README.md . It will get done.

@ra-om
Copy link

ra-om commented Mar 21, 2021

In on this. Don't want to be stuck to Firefox forever.

@mmulet
Copy link

mmulet commented Mar 21, 2021

@ra-om We're on the ebdt branch right now. https://github.com/code-relay-io/ots/tree/ebdt You can jump right in.

@flarn2006
Copy link

@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

@Pomax
Copy link
Contributor

Pomax commented May 13, 2023

@mmulet how's the work going? It would be great if OTS finally supported this =)

@mmulet
Copy link

mmulet commented May 13, 2023

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.)

@Pomax
Copy link
Contributor

Pomax commented May 14, 2023

I am, always good to know it's been useful.

@mmulet
Copy link

mmulet commented Nov 2, 2023

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!

@mmulet
Copy link

mmulet commented Jan 30, 2024

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".

@kenmcd
Copy link

kenmcd commented Jan 30, 2024

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.

@mmulet
Copy link

mmulet commented Jan 30, 2024

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.

@kenmcd
Copy link

kenmcd commented Jan 31, 2024

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.

@mmulet
Copy link

mmulet commented Jan 31, 2024

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

@kenmcd
Copy link

kenmcd commented Feb 1, 2024

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.

@stgiga
Copy link

stgiga commented Jun 24, 2024

I've made UnifontEX builds with bitmap tables but don't distribute them precisely because of OTS. I provide the FontForge SFD to allow turning it on, but I had used CacheTT afterwards to add a VDMX table so you'll need to repeat that. OTS handles all of UnifontEX's rare tables fine when no bitmaps are present.

@NightFurySL2001
Copy link

NightFurySL2001 commented Jul 14, 2024

The following CJK fonts in Windows uses EBDT/EBLC. All of these are legacy CJK font files (Windows 9x) that persist until today due to widespread usage; some of the Windows interface will still use the bitmaps from EBDT table. Filenames are font name listed using lowercase without space, ending in .ttc except SimSun-ExtB.

  • Japanese: MS Mincho (& MS PMincho), MS Gothic (& MS PGothic)
  • Korean: Batang (& Gungsuh), Gulim (& Dotum)
  • Simplfiied Chinese: SimSun (& NSimSun), SimSun-ExtB (simsunb.ttf)
  • Traditional Chinese: MingLiU (& PMingLiU & MingLiU_HKSCS)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants