-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
morisawa-biz-ud-gothic #9196
Comments
@simoncozens could you have a look? |
Biz UD Gothic was not compiled with Fontforge.
I don't think this is true. I see the claim in wine#52951 that "xAvgCharWidth is half of the unitsPerEm for Japanese fixed-pitch font". But this is not what the OpenType spec says at all.
But now:
Biz UD Gothic has an OS/2 table version number of 3, so this second calculation (average width of non-zero width glyphs) should apply. The correct value should therefore actually be 1963 - only very slightly narrower than the current value. I read itouhiro's blog and it's great that he got IPA Gothic working by changing the value to 1024... but that does not mean this I the correct fix for this font. I think the rendering software is to blame here. |
It may be against the specification, but xAvgCharWidth must be 1024 or it will malfunction with older software that cannot modify the source. xAvgCharWidth is used in a lot of software, including Microsoft's. vim-jp has fixed the problem with a dirty hack. |
@axis6404 The problem is ultimately a software problem, rather than a font problem per se. Do we hack the font to solve the problem, or leave the font as it is intended to be and put pressure on software developers to follow the rules? And it doesn't help when some legacy software environments are unlikely to be updated. A potential workaround would be to disable the PS, I personally kind of like vim-jp's dirty hack :). It solves the problem universally for fonts that follow the legacy method of setting this field, and those that follow the |
xAvgCharWidth in the OS/2 table is buggy
Describe the bug
The xAvgCharWidth in the OS/2 table is 1997 due to a bug in fontforge. The correct value is 1024. (All 0-9A-Za-z (space) widths are 1024)
This value is wrong and causes various bugs (extra spaces between characters, poor hit detection) in wine on Linux and in apps on Windows.
To Reproduce
Extra white space between characters in the Microsoft font viewer that starts when you click on a font in Windows.
https://x.com/o_tamon/status/1506193655123505154
Expected behavior
No extra white space between characters
Screenshots
https://x.com/o_tamon/status/1506193655123505154
Additional context
Reference URL:
googlefonts/morisawa-biz-ud-gothic#45
https://www.google.co.jp/search?q=UD+xAvgCharWidth
mintty/mintty#808
https://itouhiro.hatenablog.com/entry/20140910/font
https://x.com/o_tamon/status/1506193655123505154
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1012399
The text was updated successfully, but these errors were encountered: