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.

贡献者指南