Bug 18050
Summary: | Unused backup generic font of "monospace" changes actual font size | ||
---|---|---|---|
Product: | WebKit | Reporter: | jtbandes |
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WONTFIX | ||
Severity: | Normal | CC: | mrowe |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Mac | ||
OS: | OS X 10.5 | ||
URL: | http://bandes-storch.net/bug.html |
jtbandes
When text is given a backup font of "monospace", its rendered size is smaller than it would be without the backup font.
This:
font-family: Courier, monospace;
Renders fonts smaller than this:
font-family: Courier;
They should render at the same size, since Courier is used. This computer has the Courier font.
This only occurs with monospace, not any other CSS3 specified generic font. As far as I can tell, this is independent of the chosen font family. In the Web Inspector, the font family is displayed as the correct value. I have provided a link to an example page if necessary.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Dave Hyatt
This is by design. If the font size hasn't been specified, then the UA has to make a choice regarding what font size to use... 16px (the preference for non-monospace fonts) or 13px (the preference for monospace fonts). The presence of the explicit generic family is taken as a hint by WebKit that the list is of monospace fonts, and therefore the user-preferred monospace default font size should be used (13px).
I suspect this does not match other browsers though, so we could consider changing our behavior, but I certainly don't think this behavior violates the specification (or is incorrect).
Dave Hyatt
Note that Firefox will do strange things here:
Courier, monospace
will stay 16
monospace
will be 13
But
FontDoesNotExist, monospace
will also stay 16, despite the monospace family being used.
I think our behavior makes more sense than Firefox's.
Mark Rowe (bdash)
Changing to WONTFIX based on comments #1 and #2.