'kern' table is ignored when rendering TTF glyphs.
Reported by
paul.gru...@gmail.com,
Dec 8 2016
|
||||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36
Example URL:
Steps to reproduce the problem:
1. Display any text using TTF font that only contains 'kern' talbe for kerning (no GPOS/GSUB tables), such as 'Bell MT' series, which is standard on my Win8.1 x64.
2. Turn on auto-kerning feature in css: .xr_kern {text-rendering: optimizeLegibility; font-feature-settings: "kern" 1;}
3. Notice that the text is displayed without the auto-kerning feature. If you switch to any other font that has GPOS/GSUB tables, the problem goes away.
What is the expected behavior?
What went wrong?
The text should be auto-kerned, which is not the issue.
Does it occur on multiple sites: N/A
Is it a problem with a plugin? No
Did this work before? N/A
Does this work in other browsers? Yes
Chrome version: 54.0.2840.99 Channel: n/a
OS Version: 6.3
Flash Version: Shockwave Flash 23.0 r0
,
Dec 14 2016
,
Dec 19 2016
,
Jan 2 2017
,
Jan 3 2017
Thanks for the useful report and test case. The usage of kern tables for kerning is not recommended anymore: https://www.microsoft.com/typography/otspec/recom.htm "If compatibility with legacy environments is not a concern, font vendors are encouraged to record kerning in the GPOS table's kern feature and not in the kern table." If I understand the portrait of this font at https://www.microsoft.com/typography/Fonts/family.aspx?FID=157 correctly, it was released in 1992. It might still be shipping in Win 8.1 in a version with kern table only. Nevertheless, I am reducing the priority of this issue, since we're currently not prioritizing fixes for the legacy kern table. Ben, if I am not mistaken, we're retrieving the kerning pair adjustments using typeface->getKerningPairAdjustments(glyphs, 2, kerningAdjustments) (see HarfBuzzFace.cpp) - I haven't checked but could this be returning wrong values for Bell MT?
,
Jan 3 2017
getKerningPairAdjustments was only ever implemented for FreeType. It didn't seem worth it to keep working on it given that it couldn't be implemented on Mac and it would be superseded by proper shaping. I believe it could be implemented for DirectWrite.
,
Jan 3 2017
Thanks for the clarification.
,
Feb 8 2018
Closing as per discussion. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by nyerramilli@chromium.org
, Dec 12 2016