-
Notifications
You must be signed in to change notification settings - Fork 499
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
Add all alphabetic glyphs to the built-in code font (M+ 1mn) #282
Comments
The overall goal for AsciidoctorJ PDF core is to support languages with alphabetic writing systems (see https://en.wikipedia.org/wiki/List_of_writing_systems#List_of_writing_scripts_by_adoption) out of the box. We'll plan to have dedicated gems for languages based on other writing systems (e.g., logographic) so we can support them properly. |
Btw, the fallback font has already been disabled (though it can be reenabled using the default-with-fallback-font theme). |
For portability reasons (and because they are so small), we're going to keep the "ascii" variants of the mplus1mn fonts in the package and simply add a "subset" variant. The default themes will be updated to use the "subset" variants instead. |
…font (mplus1mn) - create new subset variant of mplus1mn font that includes all alphanumeric characters - switch default themes to use subset variant of mplus1mn font
Here are the Unicode ranges that I included:
|
Add multilingual support (all alphabetic glyphs) to the built-in code font (M+ 1mn) to match the coverage of the prose font (Noto Serif).
We can probably eliminate some of the symbols currently included in the prose font like ballot boxes, arrows, ellipsis and such, so it may be a slightly narrower range. What's important is that we include all the glyphs needed for writing letters (and thus words) as these can appear in code comments, strings, and terminal output, if not in variables and types. (Just think about a "Hello, World!" example that's not English).
With this change, I think we can disable the fallback font by default. The motivation for disabling the fallback font is that using it slows down conversion significantly. Prawn must check every single character against the font table to decide if the fallback glyph is needed. We'd also save 1.4 MB of space in the extracted gem.
The consequence of dropping the fallback font is that we'd lose support out of the box for Japanese, which is mostly what the fallback font is providing. However, I think that support for Japanese is better handled by a dedicated gem / theme since there are changes needed other than the font to support it properly. (We could consider adding Hiragana and Katakana characters to Noto Serif for texts that uses some Japanese characters casually or for reference).
The text was updated successfully, but these errors were encountered: