fix width font is not correct in QC editor
-
wrote on 28 Nov 2022, 06:23 last edited by QtTester
-
wrote on 28 Nov 2022, 07:11 last edited by ChrisW67
The Consolas font does not include Chinese characters. On my Ubuntu machine "Ubuntu Mono Space" matches "Noto Sans Regular"which also does not appear to cover Chinese (simplified or traditional).
The Chinese glyphs are coming from some other font that, presumably, is pushing subsequent text out of alignment in Qt Creator. Could be a buggy font (e.g. ambiguous metrics), a different font substitution in Windows/Notepad++, or buggy Qt font handling.
Any idea what font that might be?
-
The Consolas font does not include Chinese characters. On my Ubuntu machine "Ubuntu Mono Space" matches "Noto Sans Regular"which also does not appear to cover Chinese (simplified or traditional).
The Chinese glyphs are coming from some other font that, presumably, is pushing subsequent text out of alignment in Qt Creator. Could be a buggy font (e.g. ambiguous metrics), a different font substitution in Windows/Notepad++, or buggy Qt font handling.
Any idea what font that might be?
-
wrote on 28 Nov 2022, 09:12 last edited by
Ok, so you are using this Google font called "Ubuntu Mono" on Windows (No connection to Ubuntu Linux). You will see that this does not contain Chinese language (glyph) support. Windows is substituting glyphs from a different font, possibly SimSun or MingLiU.
Qt uses Harfbuzz to do font work, so that rendering path is probably different to all your other examples even if the same font is selected.
-
Ok, so you are using this Google font called "Ubuntu Mono" on Windows (No connection to Ubuntu Linux). You will see that this does not contain Chinese language (glyph) support. Windows is substituting glyphs from a different font, possibly SimSun or MingLiU.
Qt uses Harfbuzz to do font work, so that rendering path is probably different to all your other examples even if the same font is selected.
3/5