-
Notifications
You must be signed in to change notification settings - Fork 1
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
Skipped because proportional CJK #175
Comments
I think it might be caused by the lack of width of the punctuation. The width of many of the fonts I tested was 750, which is less than UPM(1000). |
Yes, because the CJK em-box isn't well-defined in the OpenType format, it needs a heuristic to determine it. The current list is chosen to see if two different fullwidth punctuation characters have the same width as 3 commonly used ideographic characters. Please see: If your font doesn't have all these glyphs, the current logic fails. I could add some fallback logic, but I wasn't sure what options/fallback logic to add, so I relied the users to provide one. You can specify the CJK em-box size or characters to compute it from by the I have to admit that the former isn't well tested, please let me know if it doesn't work as you expect. |
@kojiishi Thanks for the answer, indeed, the width of |
I have to say this is a very great project! Is it possible to add an option to generate fea files for a specific language? That way I can manually compile chws into fonts via fonttools, which is sometimes more flexible. |
This is my test font (free for commercial use): |
If all punctuation characters have the same widths, you should be able to use |
This patch changes `HanKerning::FontData` to check glyph bounding box against its advances, not against `1ch`. Under specific scale, some fonts may return advances of CJK fullwidth punctuation characters slightly different from the `1ch` (the advance of U+0x6C34). Also some fonts are known to have narrower CJK fullwidth punctuation characters than `1ch`, though they have enough space to apply kerning[1]. This patch makes these cases applicable, as long as: * The font has `halt` feature, claiming it can apply kerning. * Each group of characters have the same advances. * Characters that have language-dependent conventions have enough internal space to apply kerning. [1] kojiishi/east_asian_spacing#175 Bug: 1519775, 1463891 Change-Id: I6dd8311acee4d0cc3602176a1d2105a90f0b74d5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5216027 Commit-Queue: Kent Tamura <[email protected]> Reviewed-by: Kent Tamura <[email protected]> Auto-Submit: Koji Ishii <[email protected]> Cr-Commit-Position: refs/heads/main@{#1249933}
I am trying to execute a command on a Chinese font:
Does this project have any special requirements for the glyphs in the font or what characters need to be included?
The text was updated successfully, but these errors were encountered: