[Webkit-unassigned] [Bug 35583] New: if font-family lists several generic families, the last one takes precedence

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 2 09:05:57 PST 2010


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

           Summary: if font-family lists several generic families, the
                    last one takes precedence
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: CSS
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: olivier at tilloy.net


According to the CSS fonts specification
(http://www.w3.org/TR/css3-fonts/#font-family-the-font-family-property), "[the
font-family property] specifies a prioritized list of font family names or
generic family names", and "authors are encouraged to append a generic font
family as a last alternative for improved robustness".

It doesn't make much sense to list several generic families in a font-family
property, since all generic font families are guaranteed to be always available
by the user agent. However if one does, the current behaviour of webkit is to
override the fallback family with the last generic family encountered in the
list.
Consider the following example:

    font-family: ThisFontIsInvalid, monospace, sans-serif

If the first font family is not found on the system, the font selected should
be the UA's default monospace font. Instead, it is the default sans-serif font.

A real life example is at
http://svn.debian.org/wsvn/secure-testing/doc/narrative_introduction.
The text of the page is intended to be displayed with a fixed width, and the
the style is defined like this:

    font-family:'Consolas',monospace,sans-serif;

(in http://svn.debian.org/websvn/templates/calm/styles.css)

-- 
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