texstudio-org/texstudio

Misplacement of mixed CJK and English text in editor

Open

#455 opened on Jan 2, 2019

 (3 comments) (0 reactions) (0 assignees)C++ (397 forks)auto 404
help wanted

Repository metrics

Stars
 (3,516 stars)
PR merge metrics
 (Avg merge 5h 26m) (19 merged PRs in 30d)

Description

Environment

  • TeXstudio: 2.12.14 (git 2.12.14)
  • Qt: 5.8.0, compiled with Qt 5.8.0 R
  • OS: Windows 10 1803, 64-bit
  • TeX distribution: texlive

Expected behavior

Every English letter and Chinese char can be displayed correctly when they are mixed.

Actual behavior

There are several kinds of misplacement or overlap of letters or chars, and I don't know them clearly.

How to reproduce

I made a gif of the misplacement of the following text.

一二三(one tow three)four five six
一(一)
一二三(一二三)

This is the gif. txs

This is when all text are selected. txs-all

This is the displacement in Windows notepad as a comparison. notepad

In the above case, the misplacement occurs near (Chinese) brackets "(" and ")" and number of chars before brackets matters. Generally when displaying Chinese chars, all chars, including Chinese punctuations have the same width. But in TXS editor widths may differ. Besides, widths of blanks differ as well like four five six in the above text.

The misplacement is just the editor behavior, having no influence on other functions.

Contributor guide