WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
146333
[Cocoa] Sans-serif generic font family should map to PingFang
https://bugs.webkit.org/show_bug.cgi?id=146333
Summary
[Cocoa] Sans-serif generic font family should map to PingFang
Myles C. Maxfield
Reported
2015-06-25 17:45:44 PDT
[Cocoa] Sans-serif generic font family should map to PingFang
Attachments
Patch
(156.32 KB, patch)
2015-06-25 17:46 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews104 for mac-mavericks-wk2
(1.06 MB, application/zip)
2015-06-25 18:05 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews103 for mac-mavericks
(872.62 KB, application/zip)
2015-06-25 18:20 PDT
,
Build Bot
no flags
Details
Patch
(14.56 KB, patch)
2015-06-25 19:43 PDT
,
Myles C. Maxfield
ap
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Myles C. Maxfield
Comment 1
2015-06-25 17:46:49 PDT
Created
attachment 255603
[details]
Patch
Myles C. Maxfield
Comment 2
2015-06-25 17:49:23 PDT
Comment on
attachment 255603
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=255603&action=review
> Source/WebCore/ChangeLog:4 > +
https://bugs.webkit.org/show_bug.cgi?id=146333
Need radar number
Myles C. Maxfield
Comment 3
2015-06-25 18:00:43 PDT
Comment on
attachment 255603
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=255603&action=review
> LayoutTests/platform/mac/fast/text/han-generic-font-families-expected.txt:1 > +layer at (0,0) size 800x600
Turn this in to a reftest
Myles C. Maxfield
Comment 4
2015-06-25 18:04:45 PDT
Comment on
attachment 255603
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=255603&action=review
> LayoutTests/fast/text/han-generic-font-families.html:13 > + d.textContent = "æ¤æ®µä¸æç®ä½ææ¬ç¨äºæµè§å¨å¸å±æµè¯ã";
Woah this is a mistake
Build Bot
Comment 5
2015-06-25 18:05:51 PDT
Comment on
attachment 255603
[details]
Patch
Attachment 255603
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.appspot.com/results/6722903991123968
New failing tests: fast/text/han-generic-font-families.html
Build Bot
Comment 6
2015-06-25 18:05:55 PDT
Created
attachment 255605
[details]
Archive of layout-test-results from ews104 for mac-mavericks-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5
Build Bot
Comment 7
2015-06-25 18:19:58 PDT
Comment on
attachment 255603
[details]
Patch
Attachment 255603
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/5472806514982912
New failing tests: fast/text/han-generic-font-families.html
Build Bot
Comment 8
2015-06-25 18:20:01 PDT
Created
attachment 255607
[details]
Archive of layout-test-results from ews103 for mac-mavericks The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-mavericks Platform: Mac OS X 10.9.5
Myles C. Maxfield
Comment 9
2015-06-25 19:43:37 PDT
Created
attachment 255615
[details]
Patch
Alexey Proskuryakov
Comment 10
2015-06-25 22:41:08 PDT
Comment on
attachment 255615
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=255615&action=review
We really need to kill this code, and to use APIs for language specific font fallback.
> Source/WebCore/page/mac/SettingsMac.mm:49 > +#if PLATFORM(COCOA)
Did you mean PLATFORM(MAC)?
> Source/WebCore/page/mac/SettingsMac.mm:-72 > -#if PLATFORM(COCOA)
Looks like some old mass replace mistake.
Myles C. Maxfield
Comment 11
2015-06-26 10:25:14 PDT
(In reply to
comment #10
)
> Comment on
attachment 255615
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=255615&action=review
> > We really need to kill this code, and to use APIs for language specific font > fallback.
I'm not actually sure that makes sense. Which font do we use for fallback? Do we still want to hardcode Latin fonts and fall back from those? Why is Latin special? (Maybe Latin is special because it is the only script where the concepts of "serif" and "sans serif" are really applicable) Using naive fallback is troublesome because of some markup like "font-family: sans-serif, 'Heiti SC'". We want the sans-serif to match so that Heiti isn't rendered. Another option would be to keep the same structure, but locally probe what the fallback would be inside CoreText; this seems a little silly because we're mapping a known value to a known value. But then again, the mapping might change over time, so maybe it is valuable to dynamically create the mapping.
> > > Source/WebCore/page/mac/SettingsMac.mm:49 > > +#if PLATFORM(COCOA) > > Did you mean PLATFORM(MAC)? > > > Source/WebCore/page/mac/SettingsMac.mm:-72 > > -#if PLATFORM(COCOA) > > Looks like some old mass replace mistake.
Myles C. Maxfield
Comment 12
2015-06-26 10:28:23 PDT
Committed
r186001
: <
http://trac.webkit.org/changeset/186001
>
Myles C. Maxfield
Comment 13
2015-06-26 10:30:28 PDT
(In reply to
comment #11
)
> (In reply to
comment #10
) > > Comment on
attachment 255615
[details]
> > Patch > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=255615&action=review
> > > > We really need to kill this code, and to use APIs for language specific font > > fallback. > > I'm not actually sure that makes sense. Which font do we use for fallback? > Do we still want to hardcode Latin fonts and fall back from those? Why is > Latin special? > > (Maybe Latin is special because it is the only script where the concepts of > "serif" and "sans serif" are really applicable) > > Using naive fallback is troublesome because of some markup like > "font-family: sans-serif, 'Heiti SC'". We want the sans-serif to match so > that Heiti isn't rendered. Another option would be to keep the same > structure, but locally probe what the fallback would be inside CoreText; > this seems a little silly because we're mapping a known value to a known > value. But then again, the mapping might change over time, so maybe it is > valuable to dynamically create the mapping.
Oh, another thought - this code runs on web process creation. Doing a bunch of CT calls might actually cause a performance hit
> > > > > > Source/WebCore/page/mac/SettingsMac.mm:49 > > > +#if PLATFORM(COCOA) > > > > Did you mean PLATFORM(MAC)? > > > > > Source/WebCore/page/mac/SettingsMac.mm:-72 > > > -#if PLATFORM(COCOA) > > > > Looks like some old mass replace mistake.
David Kilzer (:ddkilzer)
Comment 14
2015-06-27 08:48:58 PDT
This caused:
Bug 146385
: REGRESSION (
r186001
): fast/text/han-generic-font-families.html always fails on Yosemite <
https://bugs.webkit.org/show_bug.cgi?id=146385
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug