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

Add all alphabetic glyphs to the built-in code font (M+ 1mn) #282

Closed
mojavelinux opened this issue Jul 27, 2015 · 5 comments
Closed

Add all alphabetic glyphs to the built-in code font (M+ 1mn) #282

mojavelinux opened this issue Jul 27, 2015 · 5 comments
Assignees
Milestone

Comments

@mojavelinux
Copy link
Member

mojavelinux commented Jul 27, 2015

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

@mojavelinux mojavelinux self-assigned this Jul 27, 2015
@mojavelinux mojavelinux added this to the v1.5.0.beta.1 milestone Jul 27, 2015
@mojavelinux
Copy link
Member Author

This is a follow-up to #72 and #99.

@mojavelinux
Copy link
Member Author

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.

@mojavelinux mojavelinux changed the title Add multilingual support to built-in code font (M+ 1mn) Add all alphabetic glyphs to the built-in code font (M+ 1mn) Jul 27, 2015
@mojavelinux
Copy link
Member Author

Btw, the fallback font has already been disabled (though it can be reenabled using the default-with-fallback-font theme).

@mojavelinux
Copy link
Member Author

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.

mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Jul 21, 2019
…font (mplus1mn)

- create new subset variant of mplus1mn font that includes all alphanumeric characters
- switch default themes to use subset variant of mplus1mn font
mojavelinux added a commit that referenced this issue Jul 22, 2019
resolves #282 include all alphanumeric characters in code font (mplus1mn)
@mojavelinux
Copy link
Member Author

Here are the Unicode ranges that I included:

  • Non-visible Characters (U+00a0, U+feff)
  • Basic Latin (U+0020–U+007e)
  • Latin-1 Supplement (U+00a0–U+00fd)
  • Latin Extended-A (U+0100–U+017f)
  • Greek Alphabet (U+0391–U+03c9)
  • Cyrillic (U+0400–U+04ff)
  • Assorted Symbols (U+20ac)
  • Enclosed Numbers (U+2460–U+2473, U+2776–U+277f, U+24eb–U+24f4) (mplus1mn-regular only)
  • Box Drawing Symbols (U+2500–U+257f)

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

1 participant