Skip to content
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

Improving compatibility with Windows 10 by adding a specific <gasp> table. #128

Closed
ShikiSuen opened this issue Sep 1, 2015 · 7 comments
Closed

Comments

@ShikiSuen
Copy link

This suggestion is recommended to be addressed onto Source Han Sans 2.00 and later versions.

Windows 10 now reads the following table. If such table with such content exists, Windows 10 won't read hinting data while rendering texts with DirectWrite.

<?xml version="1.0" encoding="UTF-8"?>
<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="2.5">

  <gasp>
    <gaspRange rangeMaxPPEM="65535" rangeGaspBehavior="10"/>
  </gasp>

</ttFont>

In such case, the rendered CJK glyphs (without reading hinting data) will be looked similar as what they appear on Mac OS X. I suggest you to attach such table with further releases of Source Han Sans.

Sampled Screenshots (using Microsoft YaHei hacked with such table):
image
image

Under Retina Display (200% Hi-DPI):
image

Reference:
http://bbs.themex.net/showthread.php?t=16903935

@ShikiSuen
Copy link
Author

Looks like there's something wrong with the markdown editor here, I present that table again as screenshot:
image

@ShikiSuen ShikiSuen changed the title Making compatibility with Windows 10 by adding a specific <gasp> table. Improving compatibility with Windows 10 by adding a specific <gasp> table. Sep 1, 2015
@miguelsousa
Copy link
Member

@ShikiSuen have you tried adding this table to any of the current Source Han Sans fonts?
gasp is a table specific to the TrueType font format. All Source Han Sans fonts are OpenType/CFF format, so my guess is that adding this gasp table to the fonts will not have any effect in the way the fonts are rendered on screen.

@ShikiSuen
Copy link
Author

@miguelsousa I am going to try. But my experiences told me that Source Han Sans (till current build) shown in Windows build of Google Chrome (using DirectWrite) still looks like it uses ClearType hinting.

DirectWrite is wonderful, but could be awful if used with ClearType Hinting together. Esp. for CJK fonts.

@kenlunde
Copy link
Contributor

kenlunde commented Sep 1, 2015

@ShikiSuen I was going to post the same thing that @miguelsousa wrote. In any case, please keep us posted.

@ShikiSuen
Copy link
Author

@kenlunde The most recent test on Windows 10 proved that adding such table onto SHS makes no difference. Topic closed.

@ShikiSuen
Copy link
Author

P.S.: If under the same LowDPI mode, SHS looks worse on Windows 8 / 10 comparing to what it looks like under OS X while using the same 9px or 12px small size.

@kenlunde
Copy link
Contributor

kenlunde commented Sep 2, 2015

OS X uses a completely different rendering engine than Windows. In many ways, OpenType/CFF remains a second class citizen on Windows, perhaps because Microsoft deploys only TrueType fonts on Windows, but Apple deploys OpenType/CFF and TrueType fonts on OS X.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants