contour icon indicating copy to clipboard operation
contour copied to clipboard

Font choice looks weird when mixing CJK & ASCII characters.

Open skyline75489 opened this issue 4 years ago • 2 comments

Description

Environment

  • Contour Version or Git commit hash: be0967df97b1c40ff8ad72ccd3f9fe38e0fc726a
  • Operating System (name / distribution / version): Manjaro KDE
  • Contour configuration: strict_spacing = false
  • TERM environment variable:
  • Compiler version:

Steps to Reproduce

image

skyline75489 avatar Nov 04 '21 09:11 skyline75489

Thanks :)

EDIT: UPDATE:

This is most likely due to segmentation not behaving as expected. During rendering the following criteria are used to segment each line:

For caching:

  • words (word segmentation is used to cache whole words in the text shape)

For text shaping, each word is further segmented into:

  • SGR attribs
  • Unicode script
  • Emoji presentation (text vs emoji)

Latin can extend into Common (and vice versa), and same for CJK mixed with Common script, but Latin should never be mixable with CJK (or any other script != Common). NB: Common is a special script that contains commonly used characters, such as parenthesis, punctuation, ...

Most likely the issue (I hope) is the word segmentation accidentally not detecting the space between your ll: and the CJK characters that I cannot copy'n'paste in here because it's a screenshot :-)

christianparpart avatar Nov 04 '21 09:11 christianparpart

@skyline75489 Hey, I hope you're doing well. Would you mind telling me what font you have been using that can trigger this? I would like to try to reproduce this and isolate it into a test case, so I can ideally improve the situation. EDIT: Ah, and maybe something I can copy'n'paste of that problematic line in your screenshot above? Many thanks :-)

christianparpart avatar Feb 06 '22 22:02 christianparpart