[Webkit-unassigned] [Bug 63492] Incorrect weight and style matching for @font-face families

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 2 04:34:28 PDT 2013


Zoltan Herczeg <zherczeg at webkit.org> changed:

           What    |Removed                     |Added
                 CC|                            |hyatt at apple.com

--- Comment #3 from Zoltan Herczeg <zherczeg at webkit.org>  2013-07-02 04:36:26 PST ---
Dan Bernstein (mitz), David Hyatt: do you remember this patch:

In CSSFontSelector::getFontFace, there are these lines:

if ((traitsMask & FontStyleNormalMask) && !(candidateTraitsMask & FontStyleNormalMask))
if ((traitsMask & FontVariantNormalMask) && !(candidateTraitsMask & FontVariantNormalMask))

If I specify a font as italic:

  @font-face {
    font-family: 'Arvo';
    src: url('arvo-bolditalic-webfont.eot');
    font-weight: bold;
    font-style: italic;

And add this to a page:

<div style="font-family: Arvo;">
Arvo Text

this check fails when traitsMask has FontStyleNormalMask, since it is an italic font. According to the Sean, the engine should not care about it.

This works correctly:

<div style="font-family: Arvo; font-style: italic;">
Arvo Text

What do you think? Shall I add another for loop if no font faces are added, which ignores FontStyle checks? What about the other condition?

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