-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
lang=ja + font-fallback + Inconsolata + typesetting the string ".ph" = crash #932
Comments
There are two bugs here; one is that tate changed the document language, which the PR above fixes. This makes it harder to see the other bug, which I need to work on more... |
Even more minimal example:
|
Oh ho ho. Loading Japanese support defines the zenkaku width character, which is defined by measuring a sample Japanese character (we measure あ). But at this point font-fallback goes mad because we don't have any fonts defined which support that character. This is thoroughly understandable, although it's obviously annoying that it crashes - I can't really see what the correct behavior is here, other than raise a warning. |
Would it help if we made defined the zenkaku width unit with a callback that would essentially delay initialization until first use? By the tme it is first used we should have a font for for the language that's going to be relevant, no? |
If no fonts have あ for 全角, then we should assume that we are being run by a Japanese user who is making a very short document, perhaps even a business card. We should use the width of "M" instead, and add a hook checking for if a Japanese font is eventually loaded, to get a real 全角. This would be my fix. |
MWE:
Crash:
The text was updated successfully, but these errors were encountered: