-
Notifications
You must be signed in to change notification settings - Fork 498
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
Missing international characters in the bundled font #72
Comments
Thanks for providing the use case. We'll get this fixed up! |
Is this the same problem that affects Swedish characters in source blocks? Or is that a different issue?
|
Exactly the same issue. The fonts that we bundle with Asciidoctor PDF should be complete fonts because Prawn already optimizes fonts when it "bakes" the PDF file. Thus, there's no reason for us to be pre-optimizing the fonts by throwing away characters as we are currently doing. (I might still reduce the fonts slightly, but only to eliminate very rare languages, certainly nothing that would affect the Western sets). |
Thanks for the additional use case! |
I see the international characters working with Asciidoctor PDF alpha 8 - which is great progress! Woohoo!
However, possibility for custom fonts would be ideal. At the moment chars get rendered, but are not supported by the default font.
|
It's highly dependent on which characters. When I produced the current Noto
Serif fonts, I included a broad range of characters, but not Cyrillic and
the CJK characters are not part of that font. That's the change that's
being requested.
|
Got it. Noto is a custom font? I see two options. I'm happy to help with extending the font with Easter European - if possible. |
I subsetted the font to make the gem smaller because at the time we had
lots of different fonts. Now we have room to include the full font, so it's
just a matter of swapping it in. I'll better document those steps when I do
so it's clear what the situation is.
|
👍 |
I want to clarify that we still have to process the font because Prawn
requires that we rewrite the kerning information to a separate table in the
font.
|
@goeh Actually this is slightly different because you're pointing out missing characters in the code font. This is separate from the body font. I intentionally subsetted the code font to only include ASCII to keep the size of the gem down. While the fallback font will catch these now, we still may want to reconsider that decision as code can have non-ASCII characters (comments, strings, etc). Let's tackle that in a separate issue. |
…Noto Serif font - add Cyrillic, Latin Extended-A and Vietnamese characters to Noto Serif font - generate Noto Serif from unhinted rather than hinted fonts - change suffix of Noto Serif fonts from "latin" to "subset" to reflect change - change suffix of M+ 1p font from "multilingual" to "fallback" - remove less frequently used glyphs from fallback font - update theme to use new font files - update Noto license date to reflect date of last file revision from git repo - document supported glyphs in default theme file
@goeh You will no longer be missing characters in monospaced text, but those characters will be coming from the fallback font atm. |
With the proposed pull request (#281), I think we're in a much better position to support a broad range of languages out of the box. We now include Cyrillic (for Russian, etc), Vietnamese characters and Latin Extended-A (for Polish, Czech, Turkish, etc) in the subsetted Noto Serif font. There really isn't much we are leaving out that the main Noto Serif font doesn't provide. The fallback font will catch Japanese characters as well as missing glyphs in literal text. The only glaring void that remains is Chinese because we aren't yet bundling a font that has offers a complete set of glyphs (only those used in Japanese too). I think the right solution for that problem is a separate gem, which has already been setup. Of course, we simply can't cover all languages with a single font...which is why I think the right long-term solution is to have gems for each language group that isn't covered by the fonts shipped in Asciidoctor PDF core. |
I'm going to document somewhere under docs the character ranges that are included in the bundled fonts. I'll also document why we subset / regenerate the fonts and how to do it for your own font. |
Update to 1.5.0.alpha.12 because of missing international characters (asciidoctor/asciidoctor-pdf#72)
Update to 1.5.0.alpha.12 because of missing international characters (asciidoctor/asciidoctor-pdf#72)
For this adoc file I get my national letters stripped out of my name, because:
"Asciidoctor PDF uses custom fonts. When I created the font files that are bundled in the gem, I did not include all international characters in the font (something I've been meaning to fix)." (see issue #69 )
The text was updated successfully, but these errors were encountered: