-
Notifications
You must be signed in to change notification settings - Fork 619
windows下中文字体乱码 (Chinese font garbled under Windows) utf8 unicode #3862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
monospace can display normal and other font (eg Ubuntu Mono and Fira Code ) cant display normal with chinese charactors . |
I wouldn't refer to the boxed number glyphs as 'garbled' - they show the character values and allow editing when fonts do not contain particular characters. Font mapping and combining seems to work poorly with GTK on Windows - its worse than native Win32 APIs or GTK on Linux. Restricting choice to just fonts observed to be safe would likely be counterproductive as a font that works well with one language (such as Chinese) may not contain the characters for other languages (such as Arabic). I don't think there is anything worth changing in the code and the user should choose a font that works for them. |
我不这么认为,在windows平台上这些字体(如 Ubuntu Mono 和Fira Code )在其他编辑器(如 atom vscode 等)能够正常显示,这些字体也是支持多语言的。 (machine translation) |
There are unlikely to be many other editors that use the GTK toolkit on Windows (vscode definitely does not) so the fact that fonts work elsewhere does not help. GTK tends to do its own thing, so how it handles fallback fonts on Windows is unknown. Vscode uses electron which is a browser library and likely uses the browser fallback list. |
Fira Code does not contain Chinese characters. This is quite clear even from just looking at the file sizes. There are many more Chinese characters than Roman characters and each takes up room in font files. A CJK font like Yu Gothic Regular Open the fonts up in a font editor like FontForge and Fira Code includes 1353 characters whereas Yu Gothic includes 15622 characters with 12469 in the CJK Unified Ideographs range. When an application asks for Fira Code, a graphics stack component called a 'font mapper' determines how to implement that request. The requested font name is matched to a file. If there isn't a matching file then a default is used. That file is opened and its supported character ranges checked. Where there are gaps, other font files are used for characters in those gaps - maybe Yu Gothic is used for Chinese characters and EmojiOne Color Regular is used for emoji. It is the font mapper component that seems to be behaving poorly or is misconfigured. |
Font substitution on Windows is broken. Please see #3980. |
There is something seriously wrong with text rending in Geany. Can't even display Thai characters. Encoding: UTF-8. Geany uses Scintilla? Notepad++ and PureBasic has no issues with unicode text. Geany just shows textboxes (Windows) with same font settings. Why a text editor does not test actual unicode (different character sets) is beyond me... |
字体,ubuntu mono 、fira code 等字体输入中文时会乱码。monospace mono 字体不会。
相关信息:
(machine translation)
Fonts such as Ubuntu Mono and Fira Code may cause garbled characters when entering Chinese. Monospace Mono font does not work.
Related information:
monospace font
fira_code font
ubuntu mono font
The text was updated successfully, but these errors were encountered: