Bug 146045 - [Cocoa] Draw fonts at their native sizes instead of scaling a 1pt font
Summary: [Cocoa] Draw fonts at their native sizes instead of scaling a 1pt font
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-16 21:24 PDT by Myles C. Maxfield
Modified: 2015-08-27 23:04 PDT (History)
3 users (show)

See Also:


Attachments
Patch (2.96 KB, patch)
2015-06-16 21:40 PDT, Myles C. Maxfield
darin: review+
Details | Formatted Diff | Diff
Patch (40.98 KB, patch)
2015-08-27 12:17 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (45.27 KB, patch)
2015-08-27 12:37 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (50.98 KB, patch)
2015-08-27 22:05 PDT, Myles C. Maxfield
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-mavericks (1.21 MB, application/zip)
2015-08-27 23:01 PDT, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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>