[Webkit-unassigned] [Bug 19161] wrong font size when css font-family includes monospace

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 14 15:35:34 PDT 2009


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


tony at chromium.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|getComputedStyle(element,   |wrong font size when css
                   |null).fontSize is wrong when|font-family includes
                   |using fallback              |monospace




------- Comment #7 from tony at chromium.org  2009-04-14 15:35 PDT -------
some more test cases at: http://ponderer.org/tests/monospace.html

In particular, having the font-family be "serif, monospace" or "times,
monospace" causes the font to be sized to the default fixed width font size. 
This is because the generic font family gets set in
CSSStyleSelector.cpp:applyProperty() in the font order from left to right and
the default font size is then determined based on the generic font family.

Firefox has a similar bug where it only uses the default fixed width font size
if the font-family is monospace (no fallbacks).  So in Firefox, "foobar,
monospace" uses the default variable width font size even though foobar doesn't
exist.
  https://bugzilla.mozilla.org/show_bug.cgi?id=175415

IE doesn't seem to have any of these problems because there is only one default
font size which I can't find the setting for.

The Firefox and WebKit bugs seems to exist because we can't take the time to
look up font existence at style parse time.  If we have to maintain that
constraint, I think Firefox's behavior is a bit better (only use the fixed font
size when the font-family is only 'monospace').


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



More information about the webkit-unassigned mailing list