Bug 146045

Summary: [Cocoa] Draw fonts at their native sizes instead of scaling a 1pt font
Product: WebKit Reporter: Myles C. Maxfield <mmaxfield>
Component: New BugsAssignee: Myles C. Maxfield <mmaxfield>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, rniwa, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
darin: review+
Patch
none
Patch
none
Patch
buildbot: commit-queue-
Archive of layout-test-results from ews101 for mac-mavericks none

Description Myles C. Maxfield 2015-06-16 21:24:49 PDT
[Cocoa] Draw fonts at their native sizes instead of scaling a 1pt font
Comment 1 Myles C. Maxfield 2015-06-16 21:40:06 PDT
Created attachment 254998 [details]
Patch
Comment 2 Myles C. Maxfield 2015-06-16 21:43:22 PDT
Comment on attachment 254998 [details]
Patch

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

> Source/WebCore/ChangeLog:9
> +        In his WWDC talk[1], Antonio Cavedoni describes how laying out a font at a particular point size
> +        may yield different visual results than laying out a font at a 1pt size into a scaled context.

This patch is about drawing, not layout.
Comment 3 Sam Weinig 2015-06-17 05:54:40 PDT
Is this actually true for any fonts other than the system fonts? If so, can we have a test case?
Comment 4 Darin Adler 2015-06-17 15:46:36 PDT
Comment on attachment 254998 [details]
Patch

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

> Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm:-369
> -    CGAffineTransform matrix = useLetterpressEffect || platformData.isColorBitmapFont() ? CGAffineTransformIdentity : CGAffineTransformMakeScale(fontSize, fontSize);

Did you test these special cases? Does the letterpress effect still work after this? Do color bitmap fonts still work after this?
Comment 5 Myles C. Maxfield 2015-08-27 11:27:01 PDT
On my Yosemite machine, the only color bitmap font is AppleColorEmoji.
Comment 6 Myles C. Maxfield 2015-08-27 11:32:55 PDT
I can't remember if I had already verified this earlier, so I'm re-verifying now. Verified that color bitmap fonts work properly.
Comment 7 Myles C. Maxfield 2015-08-27 11:35:54 PDT
Letterpress can be tested with text-decoration: -webkit-letterpress, but I don't have an iOS build handy to test this on. I'll test later today when I'm at the office.
Comment 8 Myles C. Maxfield 2015-08-27 12:17:31 PDT
Created attachment 260078 [details]
Patch
Comment 9 Myles C. Maxfield 2015-08-27 12:37:37 PDT
Created attachment 260080 [details]
Patch
Comment 10 Myles C. Maxfield 2015-08-27 22:05:49 PDT
Created attachment 260121 [details]
Patch
Comment 11 Myles C. Maxfield 2015-08-27 22:58:59 PDT
Verified that letterpress still works.
Comment 12 Build Bot 2015-08-27 23:01:55 PDT
Comment on attachment 260121 [details]
Patch

Attachment 260121 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/115374

New failing tests:
imported/mozilla/svg/text/simple-fill-gradient.svg
imported/mozilla/svg/text-layout-06.svg
fast/multicol/newmulticol/spanner2.html
fast/regions/region-overflow-auto-overflow-visible.html
svg/custom/hidpi-masking-clipping.svg
fast/text/empty-shadow.html
imported/mozilla/svg/text-scale-02.svg
Comment 13 Build Bot 2015-08-27 23:01:58 PDT
Created attachment 260127 [details]
Archive of layout-test-results from ews101 for mac-mavericks

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-mavericks  Platform: Mac OS X 10.9.5
Comment 14 Myles C. Maxfield 2015-08-27 23:04:18 PDT
Committed r189087: <http://trac.webkit.org/changeset/189087>