Bug 157954 - [Cocoa] REGRESSION(r184899): Ascent adjustments are applied to web fonts
Summary: [Cocoa] REGRESSION(r184899): Ascent adjustments are applied to web fonts
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-05-20 12:59 PDT by Myles C. Maxfield
Modified: 2016-05-20 15:09 PDT (History)
5 users (show)

See Also:


Attachments
Patch (263.27 KB, patch)
2016-05-20 13:02 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (6.03 KB, patch)
2016-05-20 15:02 PDT, Myles C. Maxfield
dino: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2016-05-20 12:59:14 PDT
REGRESSION(r184899): Ascent adjustments are applied to web fonts
Comment 1 Myles C. Maxfield 2016-05-20 13:02:20 PDT
Created attachment 279498 [details]
Patch
Comment 2 Myles C. Maxfield 2016-05-20 13:03:00 PDT
<rdar://problem/24204349>
Comment 3 Dean Jackson 2016-05-20 13:15:59 PDT
Comment on attachment 279498 [details]
Patch

I don't think we can commit this font file to Open Source. We don't have a license for it.

Can we use something else?
Comment 4 Myles C. Maxfield 2016-05-20 15:02:25 PDT
Created attachment 279504 [details]
Patch
Comment 5 Dean Jackson 2016-05-20 15:05:16 PDT
Comment on attachment 279504 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=279504&action=review

> LayoutTests/fast/text/resources/Helvetica_light.svg:6
> +<font id="Litherum" horiz-adv-x="1024">

How is this working if the id is Litherum? and the family you use below is "Helvetica".
Comment 6 Myles C. Maxfield 2016-05-20 15:06:43 PDT
Comment on attachment 279504 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=279504&action=review

>> LayoutTests/fast/text/resources/Helvetica_light.svg:6
>> +<font id="Litherum" horiz-adv-x="1024">
> 
> How is this working if the id is Litherum? and the family you use below is "Helvetica".

The @font-face block doesn't list a fragment identifier, so it will just use the first (or last, I can't remember) font in the file.

The font-family below is what the SVG -> OTF converter uses to embed the family name inside the font (and is necessary to trigger the ascent adjustment).
Comment 7 Dean Jackson 2016-05-20 15:07:02 PDT
Comment on attachment 279504 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=279504&action=review

>> LayoutTests/fast/text/resources/Helvetica_light.svg:6
>> +<font id="Litherum" horiz-adv-x="1024">
> 
> How is this working if the id is Litherum? and the family you use below is "Helvetica".

You should at least remove this id.

> LayoutTests/fast/text/resources/Helvetica_light.svg:7
> +<font-face units-per-em="2048" ascent="1577" descent="-471" font-family="Helvetica"/>

And change the family name.
Comment 8 Myles C. Maxfield 2016-05-20 15:09:58 PDT
Committed r201228: <http://trac.webkit.org/changeset/201228>