[Webkit-unassigned] [Bug 57951] New: WebKit should use the last font in family list for system fallback instead of the first

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 6 08:04:51 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=57951

           Summary: WebKit should use the last font in family list for
                    system fallback instead of the first
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Text
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: gzjjgod at gmail.com


For a list in CSS like the following:

    font-family: Times, sans-serif;

And the user-agent sets 'Helvetica' as the default font for 'sans-serif'.

When the glyph for a certain character cannot be found in 'Times', neither could it be found in 'Helvetica', then WebKit will always use 'Times' (the primaryFont) to look for the system fallback font (in FontCache::getFontDataForCharacters). Wouldn't it make more sense to use the last one (Helvetica in this case) for system fallback? They can result in different fonts. In the attached example, using Times will results the fallback font be STSong, while using 'Helvetica' will get 'STHeiti'.

A (serious) side effect of this problem is that you can't combine a serif font (say, Times) and the system provided sans-serif font (though you don't know the exact name, in some system it maybe STHeiti, in others it may be Droid Sans Fallback) unless you know exactly what the sans-serif font is.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list