在 post.isFixedPitch 和 OS/2.xAvgCharWidth 中支持双空格 (拉丁文/韩文) 字体
Support for duospaced (Latin/Hangul) fonts in post.isFixedPitch and OS/2.xAvgCharWidth
Summary
Thank you for your continued work on FontForge. It is an invaluable free tool for font development.
I encountered a font metadata issue when using FontForge to add a glyph to and regenerate D2Coding Ver 1.3.3, a Korean coding font based on NanumBarunGothic.
Reference:
D2Coding Ver 1.3.3 – official GitHub Releases
D2Coding is a monospaced typeface designed for programming. The official D2Coding documentation states that a Hangul syllable has exactly twice the advance width of a Latin character. This is an intentional duospaced design:
Latin / ASCII glyphs 500 units
Hangul / CJK glyphs 1000 units
unitsPerEm 1000
Therefore, two Latin characters occupy the same horizontal grid width as one Hangul character.
The actual glyph advance widths remain correct after regeneration, but two important font metadata values are changed by FontForge.
Actual result
I compared the original D2Coding 1.3.3 font with the font regenerated by FontForge.
Font metadata | Original D2Coding 1.3.3 | FontForge-generated file -- | -- | -- post.isFixedPitch | 1 | 0 OS/2.xAvgCharWidth | 500 | 944内容来源: fontforge/fontforge