Open sumbrez opened 5 years ago
I copy-pasted the above code snippet into the editor, but cannot reproduce the behavior. Everything works as expected. Can you please provide an example file so that I can exclude any copy-paste/encoding/conversion errors.
Here is the file containing text above and saved by my TXS. (extension is changed to txt
for uploading)
document.txt
But I think there should be no copy-paste error. Moreover, after pasting the text above, there is a change as the following gif.
The font is Consolas
and my editor settings is
CJK chars are displayed in 宋体
as the result of fallback font.
Moreover, I tried changing font from Consolas
to 宋体
which contains letters as well, and the issue disappeared.
Sorry, not reproducible here. Seems to be font-dependent. I don't know how to proceed with this.
I assume that this has something to do with the CJK fallback font for fonts that do not have CJK glyphs like Consolas. Further investigation would probably need somebody with more knowledge on these.
Environment
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.
This is the gif.
This is when all text are selected.
This is the displacement in Windows notepad as a comparison.
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.