texstudio-org/texstudio

Misplacement of mixed CJK and English text in editor

開放

#455 建立於 2019年1月2日

 (3 則留言) (0 個反應) (0 位負責人)C++ (397 個分叉)auto 404
help wanted

倉庫指標

星標
 (3,516 顆星)
PR 合併指標
 (平均合併 5小時 26分鐘) (30 天內合併 19 個 PR)

描述

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.

貢獻者指南