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

Single "megafont" covering all scripts covered by all Noto fonts #12

Open
hakanai opened this issue Oct 10, 2016 · 7 comments
Open

Single "megafont" covering all scripts covered by all Noto fonts #12

hakanai opened this issue Oct 10, 2016 · 7 comments

Comments

@hakanai
Copy link

hakanai commented Oct 10, 2016

We are cursed with multiple inconvenient PDF generation libraries which can't do font fallback, so we want a single "megafont" which covers as much as possible. Arial Unicode is currently being used for this, but its licence prevents us redistributing it ourselves.

So the news of Noto was exciting. The news was billing it as a single font which covers everything. But the download page doesn't look like that at all. Instead of a single font which covers everything, I see multiple fonts which each cover a subset. So it doesn't solve our problem at all. :(

Can we not have a single font which covers everything the individual Noto fonts cover?

@dougfelt
Copy link

Strictly speaking, no, because there are many more glyphs in Noto than can fit into a single font. CJK alone is as large as it can get.

In addition, different scripts prefer different line metrics. Noto tries to provide suitable line metrics for each script rather than forcing all scripts to fit one. The UI fonts are an exception to this, however, so using them we could generate a single font sharing a single line height.

That said, we are working on a possible repackaging of the fonts into a few files. We can probably get one for CJK, one for common scripts in living languages, and one for obscure scripts-- depends if Tangut pushes us over the limit of what non-CJK we can fit into a single font . There are tools that can be used to merge fonts but the devil is in the details-- some common characters are in a few source fonts and if they behave differently we'd have to work that out.

@hakanai
Copy link
Author

hakanai commented Oct 11, 2016

Ouch, I wasn't aware that the current, latest format we use for font files couldn't even fit one glyph for each character currently in Unicode...

@brawer
Copy link

brawer commented Oct 11, 2016

You could try merging things yourself, for example with the merge tool in fontools. But as Doug said, you’ll run into OpenType limit of 64K glyphs per file. Which PDF generation libraries do you use? Have you asked them to implement font fallback?

@jungshik
Copy link

some common characters are in a few source fonts and if they behave differently we'd have
to work that out.

One possibility for them is to add opentype 'loca' features to pick different glyphs for common characters per 'locale/lang' when merging fonts with common characters. However, PDF generation tools that cannot deal with font fallback are not likely to take advantage of opentype 'loca'.

The same thing can be said of using BASE tables to support scripts with different metrics in a combined font.

@brawer
Copy link

brawer commented Oct 12, 2016

@trejkaz, which specific PDF generation libraries are you using?

@KrasnayaPloshchad
Copy link

KrasnayaPloshchad commented Oct 17, 2016

That is what GNU FreeFont and DejaVu fonts does anyway, but they doesn’t receive CJK. BTW I think your PDF generating tools seems badly.

@hakanai
Copy link
Author

hakanai commented Oct 17, 2016

@brawer, quite a lot of different ones, actually... iText is one example where you would pretty much have to implement font fallback yourself to get it to do it at all.

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

6 participants