WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
25860
Chromium Linux font fallback should try more fonts
https://bugs.webkit.org/show_bug.cgi?id=25860
Summary
Chromium Linux font fallback should try more fonts
Evan Martin
Reported
2009-05-18 18:41:11 PDT
Our getLastResortFallbackFont is a stub. We should fall back on the generic names "Sans", "Serif", etc. if our other fallbacks have failed. (Note that we intentionally *don't* map CSS names like "sans-serif" via the settings because we want those to remain Arial for compatibility.) See also
http://code.google.com/p/chromium/issues/detail?id=10665
Attachments
fix
(2.18 KB, patch)
2009-05-18 18:47 PDT
,
Evan Martin
eric
: review+
Details
Formatted Diff
Diff
fix
(2.03 KB, patch)
2009-05-21 16:54 PDT
,
Evan Martin
no flags
Details
Formatted Diff
Diff
align with switch
(2.00 KB, patch)
2009-05-21 16:59 PDT
,
Evan Martin
eric
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Evan Martin
Comment 1
2009-05-18 18:47:45 PDT
Created
attachment 30456
[details]
fix WebCore/ChangeLog | 11 +++++++++ .../platform/graphics/chromium/FontCacheLinux.cpp | 24 ++++++++++++++++++- 2 files changed, 33 insertions(+), 2 deletions(-)
Evan Martin
Comment 2
2009-05-18 18:48:29 PDT
Adding some reviewers for comments.
Eric Seidel (no email)
Comment 3
2009-05-18 19:07:30 PDT
I have no way of knowing if this font fallback behavior is "correct" or not. Hyatt might know. This looks different from the Mac code, but maybe is correct for Chromium? Seems a little silly to fallback to Sans twice.
Evan Martin
Comment 4
2009-05-18 19:11:48 PDT
Yes, in the Mac code it uses this strictly for last resort fallback. However this behavior more closely matches FontCacheChromiumWin. I also don't know which is more correct. Note that I *believe* that keeping "sans-serif" in CSS matching "Arial" in font lookup is desirable.
Evan Martin
Comment 5
2009-05-18 19:13:17 PDT
Oh, and the double-fallback is a bit silly, but the alternatives are all more code. And a system that doesn't have "Serif" or "Monospace" set up is pretty seriously broken. One idea is just to remove that last try, because if you don't have those fonts you're unlikely to have Sans anyway. I'd still want to add a "default:" on the switch then.
Eric Seidel (no email)
Comment 6
2009-05-21 16:49:56 PDT
Comment on
attachment 30456
[details]
fix Hyatt's AWOL, or at least not answering mail. This ain't gonna hurt anything and seems sane enough for Linux.
Evan Martin
Comment 7
2009-05-21 16:54:30 PDT
Created
attachment 30565
[details]
fix WebCore/ChangeLog | 11 ++++++++++ .../platform/graphics/chromium/FontCacheLinux.cpp | 21 ++++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-)
Evan Martin
Comment 8
2009-05-21 16:59:08 PDT
Created
attachment 30566
[details]
align with switch WebCore/ChangeLog | 11 ++++++++++ .../platform/graphics/chromium/FontCacheLinux.cpp | 21 ++++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-)
Eric Seidel (no email)
Comment 9
2009-05-21 17:03:18 PDT
Comment on
attachment 30566
[details]
align with switch Looks great. Dave could add an ASSERT(fontPlatformData); right before the return. In that case, where a user's system is totally hosed, we might as well crash early instead of late.
David Levin
Comment 10
2009-05-21 17:17:02 PDT
http://trac.webkit.org/changeset/44015
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