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

Handle CJK rendering #263

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

medicalwei
Copy link

@medicalwei medicalwei commented Jun 19, 2021

This changeset addresses two problems:

  1. When language is set to zh_TW (LANG=zh_TW), the metrics would be incorrect.
  2. When rendering CJK characters, the width of each consecutive CJK characters would be off.

This changeset addresses the above problems by making a break in itemizer for every non-ascii characters, as well as forcing the metrics information to be in en_US. This assumes that monospace fonts have all ASCII glyphs. Also, this would cause ligatures in non-ASCII fail.

Closes #256

@medicalwei medicalwei changed the title Handle CJK rendering WIP: Handle CJK rendering Jun 19, 2021
@medicalwei medicalwei changed the title WIP: Handle CJK rendering Handle CJK rendering Jun 19, 2021
@medicalwei medicalwei force-pushed the handle-cjk-rendering branch from 6aa1d97 to 42b1b5d Compare June 19, 2021 13:08
@medicalwei
Copy link
Author

medicalwei commented Jun 19, 2021

Note that this commit would cause slowdowns when editing lines containing too many non-ASCII glyphs, which would imply that performance rendering documents like Cyrillic would be heavily affected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chinese font width error
1 participant