Changeset 140967 in webkit


Ignore:
Timestamp:
Jan 28, 2013 7:34:59 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[Freetype] Synthetic bold not applied to fallback fonts properly
https://bugs.webkit.org/show_bug.cgi?id=107733

Patch by Martin Robinson <mrobinson@igalia.com> on 2013-01-28
Reviewed by Gustavo Noronha Silva.

Source/WebCore:

No new tests. This is covered by existing pixel tests.

  • platform/graphics/freetype/FontPlatformDataFreeType.cpp:

(WebCore::FontPlatformData::FontPlatformData): When we detect a situation in which
we are a bold font, but the Fontconfig pattern does not describe the font as
bold, we should activate synthetic bolding.

LayoutTests:

  • platform/gtk/fast/css/font-face-multiple-faces-expected.png:
  • platform/gtk/fast/css/font-face-synthetic-bold-italic-expected.png: Added.
  • platform/gtk/fast/dom/34176-expected.png: Added.
  • platform/gtk/fast/encoding/denormalised-voiced-japanese-chars-expected.png:
  • platform/gtk/fast/text/bidi-embedding-pop-and-push-same-expected.png:
  • platform/gtk/fast/text/cg-fallback-bolding-expected.png:
  • platform/gtk/fast/text/fallback-traits-fixup-expected.png:
  • platform/gtk/fast/text/international/bidi-LDB-2-CSS-expected.png:
  • platform/gtk/fast/text/international/bidi-LDB-2-HTML-expected.png:
  • platform/gtk/fast/text/international/bidi-LDB-2-formatting-characters-expected.png:
  • platform/gtk/fast/text/international/bold-bengali-expected.png:
  • platform/gtk/fast/text/international/khmer-selection-expected.png:
  • platform/gtk/fast/writing-mode/Kusa-Makura-background-canvas-expected.png:
Location:
trunk
Files:
2 added
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r140965 r140967  
     12013-01-28  Martin Robinson  <mrobinson@igalia.com>
     2
     3        [Freetype] Synthetic bold not applied to fallback fonts properly
     4        https://bugs.webkit.org/show_bug.cgi?id=107733
     5
     6        Reviewed by Gustavo Noronha Silva.
     7
     8        * platform/gtk/fast/css/font-face-multiple-faces-expected.png:
     9        * platform/gtk/fast/css/font-face-synthetic-bold-italic-expected.png: Added.
     10        * platform/gtk/fast/dom/34176-expected.png: Added.
     11        * platform/gtk/fast/encoding/denormalised-voiced-japanese-chars-expected.png:
     12        * platform/gtk/fast/text/bidi-embedding-pop-and-push-same-expected.png:
     13        * platform/gtk/fast/text/cg-fallback-bolding-expected.png:
     14        * platform/gtk/fast/text/fallback-traits-fixup-expected.png:
     15        * platform/gtk/fast/text/international/bidi-LDB-2-CSS-expected.png:
     16        * platform/gtk/fast/text/international/bidi-LDB-2-HTML-expected.png:
     17        * platform/gtk/fast/text/international/bidi-LDB-2-formatting-characters-expected.png:
     18        * platform/gtk/fast/text/international/bold-bengali-expected.png:
     19        * platform/gtk/fast/text/international/khmer-selection-expected.png:
     20        * platform/gtk/fast/writing-mode/Kusa-Makura-background-canvas-expected.png:
     21
    1222013-01-28  Pavel Feldman  <pfeldman@chromium.org>
    223
  • trunk/Source/WebCore/ChangeLog

    r140966 r140967  
     12013-01-28  Martin Robinson  <mrobinson@igalia.com>
     2
     3        [Freetype] Synthetic bold not applied to fallback fonts properly
     4        https://bugs.webkit.org/show_bug.cgi?id=107733
     5
     6        Reviewed by Gustavo Noronha Silva.
     7
     8        No new tests. This is covered by existing pixel tests.
     9
     10        * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
     11        (WebCore::FontPlatformData::FontPlatformData): When we detect a situation in which
     12        we are a bold font, but the Fontconfig pattern does not describe the font as
     13        bold, we should activate synthetic bolding.
     14
    1152013-01-28  Vsevolod Vlasov  <vsevik@chromium.org>
    216
  • trunk/Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp

    r137146 r140967  
    131131    if (fontDescription.weight() >= FontWeightBold) {
    132132        // The FC_EMBOLDEN property instructs us to fake the boldness of the font.
    133         FcBool fontConfigEmbolden;
     133        FcBool fontConfigEmbolden = FcFalse;
    134134        if (FcPatternGetBool(pattern, FC_EMBOLDEN, 0, &fontConfigEmbolden) == FcResultMatch)
    135135            m_syntheticBold = fontConfigEmbolden;
     136
     137        // Fallback fonts may not have FC_EMBOLDEN activated even though it's necessary.
     138        int weight = 0;
     139        if (!m_syntheticBold && FcPatternGetInteger(pattern, FC_WEIGHT, 0, &weight) == FcResultMatch)
     140            m_syntheticBold = m_syntheticBold || weight < FC_WEIGHT_DEMIBOLD;
    136141    }
    137142}
Note: See TracChangeset for help on using the changeset viewer.