-
Notifications
You must be signed in to change notification settings - Fork 368
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
请问为什么我的等距更纱黑体并不是等距 #108
Comments
Notepad++ again. |
This is the thing: GDI only support glyph widths bing integer pixels (while DWRITE/FreeType support fractional advance widths) so if the PPEM is not an even integer number (yes PPEM can be a faction too) then you won't have perfect alignment. Old Microsoft fonts like SimHei have |
@CyanoHao GDI's "pt" seems related with (font's built-in) line height rather than a fixed DPI |
TTF 的黑魔法真多啊…… 😂 我试着给 Sarasa 写了 hdmx 表,从 11 到 48 的所有奇数 ppem,半角字符的宽度向上取整,全角字符宽度为半角字符的 2 倍,现在可以在 Notepad++ 里面对齐了。 下载链接:https://pan.baidu.com/s/1xl5p2-NtNW6vmRCuiwXklQ 字体名前面加了 “hdmx: ”,可以直接安装,不会和现有的 Sarasa 字体冲突。 这是写 hdmx 表的 Python 程序:build-hdmx-for-sarasa.zip(依赖 fonttools,很慢,处理一个 ttf 文件要 1 分多钟。) |
@be5invis: this bug is not notepad++ only though, I can reproduce it in notepad.exe with font size = 11. |
Hi, I also see the same issue. I'm currently see this issue in Code::Blocks IDE(in-fact, it happens in all wxWidgets based application) and notepad.exe(shipped by Windows), when the font size = 11, I'm using the 等距更纱黑体 SC font which is the mono-space Simplified Chinese version. Anyone know how to fix this issue? |
I just download the latest release from this site: CJK characters alignment issue in some applications · Issue #1 · jonz94/Sarasa-Gothic-Nerd-Fonts And it did solve my issue both in Code::Blocks and notepad.exe. Thanks. |
The text was updated successfully, but these errors were encountered: