New issue
Advanced search Search tips

Issue 621354 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Nov 14
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Kerning not working for kern-only, no GPOS webfont

Reported by and...@mamchur.net, Jun 19 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36

Example URL:
http://mamchur.net/kerning/index.html

Steps to reproduce the problem:
1. Define custom font
2. Assign new font-family to HTML/SVG element or render text into canvas element
3. Observe text rendering issue

What is the expected behavior?
Text kerning should be applied between font glyphs

What went wrong?
Kerning values are ignored, glyphs x-advance is used only. 

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: 51.0.2704.103  Channel: stable
OS Version: OS X 10.11.5
Flash Version: Shockwave Flash 22.0 r0
 
Cc: nyerramilli@chromium.org
Labels: Needs-Feedback
Thanks for the report.

Able to reproduce the issue on Mac OS X 10.11.5 using Chrome Canary #53.0.2773.0 and stable 51.0.2704.103

Compared with FF in Mac, HTML,SVG & Canvas texts are not rendered properly in Chrome. Attached screenshot for reference. 
andrii@, could you please check and confirm the expected behavior, based on that will provide the bisect information.

Thanks in advance.
621354.jpg
317 KB View Download

Comment 2 by and...@mamchur.net, Jun 20 2016

Checked & confirmed - attached screenshot fully describes issue.

FF has correct text rendering - all HTML/SVG & Canvas rendering support kerning.
Chrome ignores glyphs kerning.

Thanks for fast response,
Andrii Mamchur
Project Member

Comment 3 by sheriffbot@chromium.org, Jun 20 2016

Labels: -Needs-Feedback Needs-Review
Owner: nyerramilli@chromium.org
Thank you for providing more feedback. Adding requester "nyerramilli@chromium.org" for another review and adding "Needs-Review" label for tracking.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Components: Blink>HTML>Font
Labels: -Type-Compat -Needs-Review M-53 OS-Windows Type-Bug
Owner: ----
Status: Untriaged (was: Unconfirmed)
thanks for the confirmation.

This is non-regression, issue existing from M30 build #30.0.1549.0

Issue specific to Win7, Mac OS X only; working fine in Ubuntu 14.04

Comment 5 by tkent@chromium.org, Jun 24 2016

Components: -Blink>HTML>Font Blink>WebFonts
Owner: ksakamoto@chromium.org
Status: Assigned (was: Untriaged)
Sakamoto-san,

Can you take a quick look on this bug?
I confirmed that this works correctly on Linux. Do you know any platform dependent code path that could cause this problem?
Cc: kojii@chromium.org e...@chromium.org drott@chromium.org
Owner: ----
Status: Available (was: Assigned)
Hmm I have no idea.

+font experts - does anyone have any clue?

Comment 8 by drott@chromium.org, Jun 30 2016

Status: WontFix (was: Available)
Summary: Kerning not working for kern-only, no GPOS webfont (was: Text kerning doesn't work for custom font(s))
Dumping BellaDonna.ttf using fonttools [1]:

$ ttx BellaDonna.ttf 
Dumping "BellaDonna.ttf" to "BellaDonna#2.ttx"...
Dumping 'GlyphOrder' table...
Dumping 'head' table...
Dumping 'hhea' table...
Dumping 'maxp' table...
Dumping 'OS/2' table...
Dumping 'hmtx' table...
Dumping 'LTSH' table...
Dumping 'VDMX' table...
Dumping 'hdmx' table...
Dumping 'cmap' table...
Dumping 'fpgm' table...
Dumping 'prep' table...
Dumping 'cvt ' table...
Dumping 'loca' table...
Dumping 'glyf' table...
Dumping 'kern' table...
Dumping 'name' table...
Dumping 'post' table...

It shows that BellaDonna.ttf does not have GPOS table, but only a kern table. Looks like we don't support retrieving kerning information on Windows and Mac through the kern table, but only through GPOS. I believe, GPOS is the more common and recommended way to specify kerning information, but CC'ing Behdad for comment here. 

You can fix your custom font by generating a GPOS table for example using fontforge. Attaching a copy of BellaDonna.ttf in which this works at least for the SVG and HTML examples. 

I'll mark this as WontFix for now, for reasons of rare cases of fonts that have kerning information only in the kern table, unless Behdad thinks this should be fixed.

[1] https://github.com/behdad/fonttools
BellaDonna_GPOS.ttf
112 KB Download

Comment 9 by drott@chromium.org, Jun 30 2016

Cc: behdad@chromium.org
It doesn't make sense to me that this work on Linux but not other platforms.  Skia must be the culprit.  We rely on the get_h_kerning() implementation that calls Skia to get that.

WONTFIX sounds about right to me; we'll eventually implement the kern table in HarfBuzz directly.
Labels: -Pri-2 Pri-3
Status: Available (was: WontFix)
Agree that the reason is calling back into Skia for these values and not getting them on Windows and Mac. If we can implement it in HarfBuzz through support for the kern table directly, I'll reopen this and lower the priority to 3.  andrii, thank you for the report and test case.
Chromium Team, thank you for investigating this issue.
Project Member

Comment 13 by sheriffbot@chromium.org, Jul 4 2016

Labels: -M-53 M-54 MovedFrom-53
Moving this nonessential bug to the next milestone.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 14 by sheriffbot@chromium.org, Jul 4 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: bunge...@chromium.org
Status: Available (was: Untriaged)

Comment 16 by behdad@google.com, Nov 14 2017

I'm fixing this in HarfBuzz upstream; very soon.
Project Member

Comment 17 by sheriffbot@chromium.org, Nov 14

Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Behdad, any updates?
Status: Fixed (was: Untriaged)
This has been fixed long ago.

Sign in to add a comment