Changeset 63780 in webkit


Ignore:
Timestamp:
Jul 20, 2010 3:23:45 PM (14 years ago)
Author:
evan@chromium.org
Message:

2010-07-20 Daniel Erat <derat@chromium.org>

Reviewed by Ojan Vafai.

Subpixel rendering always disabled for Chromium Linux
https://bugs.webkit.org/show_bug.cgi?id=42220

Layout test addition to check that Chromium Linux honors fontconfig
settings enabling or disabling subpixel rendering per-strike.

  • platform/chromium-linux/platform/chromium/fast/text/chromium-linux-fontconfig-renderstyle-expected.checksum:
  • platform/chromium-linux/platform/chromium/fast/text/chromium-linux-fontconfig-renderstyle-expected.png:
  • platform/chromium-linux/platform/chromium/fast/text/chromium-linux-fontconfig-renderstyle-expected.txt:
  • platform/chromium/fast/text/chromium-linux-fontconfig-renderstyle.html:

2010-07-20 Daniel Erat <derat@chromium.org>

Reviewed by Ojan Vafai.

Subpixel rendering always disabled for Chromium Linux
https://bugs.webkit.org/show_bug.cgi?id=42220

Explicitly initialize global Chromium Linux isSkiaSubpixelGlyphs
flag to false for clarity.

  • platform/graphics/chromium/FontPlatformDataLinux.cpp:

2010-07-20 Daniel Erat <derat@chromium.org>

Reviewed by Ojan Vafai.

Subpixel rendering always disabled for Chromium Linux
https://bugs.webkit.org/show_bug.cgi?id=42220

Honor Fontconfig subpixel rendering setting on Chromium Linux.

  • src/gtk/WebFontInfo.cpp: (WebKit::WebFontInfo::renderStyleForStrike):
Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r63774 r63780  
     12010-07-20  Daniel Erat  <derat@chromium.org>
     2
     3        Reviewed by Ojan Vafai.
     4
     5        Subpixel rendering always disabled for Chromium Linux
     6        https://bugs.webkit.org/show_bug.cgi?id=42220
     7
     8        Layout test addition to check that Chromium Linux honors fontconfig
     9        settings enabling or disabling subpixel rendering per-strike.
     10
     11        * platform/chromium-linux/platform/chromium/fast/text/chromium-linux-fontconfig-renderstyle-expected.checksum:
     12        * platform/chromium-linux/platform/chromium/fast/text/chromium-linux-fontconfig-renderstyle-expected.png:
     13        * platform/chromium-linux/platform/chromium/fast/text/chromium-linux-fontconfig-renderstyle-expected.txt:
     14        * platform/chromium/fast/text/chromium-linux-fontconfig-renderstyle.html:
     15
    1162010-07-20  Chris Fleizach  <cfleizach@apple.com>
    217
  • trunk/LayoutTests/platform/chromium-linux/platform/chromium/fast/text/chromium-linux-fontconfig-renderstyle-expected.checksum

    r62127 r63780  
    1 059488219a7bb44e3e814c3db350a709
     1cf183d1ad8fabcd47b4024cd890704b9
  • trunk/LayoutTests/platform/chromium-linux/platform/chromium/fast/text/chromium-linux-fontconfig-renderstyle-expected.txt

    r62127 r63780  
    1919          text run at (718,0) width 32: "in the"
    2020          text run at (0,20) width 89: "following tests."
    21       RenderBlock {OL} at (0,56) size 784x399
     21      RenderBlock {OL} at (0,56) size 784x471
    2222        RenderListItem {LI} at (40,0) size 744x55
    2323          RenderBlock {P} at (0,0) size 744x20
     
    101101              RenderText {#text} at (70,5) size 92x13
    102102                text run at (70,5) width 92: "hopefully autohinted"
     103        RenderListItem {LI} at (40,415) size 744x56
     104          RenderBlock {P} at (0,0) size 744x20
     105            RenderListMarker at (-21,0) size 16x19: "6"
     106            RenderText {#text} at (0,0) size 590x19
     107              text run at (0,0) width 414: "The following text should show that fontconfig can be used to enable "
     108              text run at (414,0) width 176: "or disable subpixel rendering."
     109          RenderBlock {P} at (0,36) size 744x20
     110            RenderInline {SPAN} at (0,0) size 57x18
     111              RenderText {#text} at (0,0) size 57x18
     112                text run at (0,0) width 57: "subpixel"
     113            RenderText {#text} at (57,0) size 4x19
     114              text run at (57,0) width 4: " "
     115            RenderInline {I} at (0,0) size 14x19
     116              RenderText {#text} at (61,0) size 14x19
     117                text run at (61,0) width 14: "vs"
     118            RenderText {#text} at (75,0) size 4x19
     119              text run at (75,0) width 4: " "
     120            RenderInline {SPAN} at (0,0) size 78x18
     121              RenderText {#text} at (79,0) size 78x18
     122                text run at (79,0) width 78: "no subpixel"
  • trunk/LayoutTests/platform/chromium/fast/text/chromium-linux-fontconfig-renderstyle.html

    r62121 r63780  
    4343        <p><span style="font-family:AutohintedSerif; font-size:0.6em;">autohinted</span> <i>vs</i> <span style="font-family:FullAndAutoHintedSerif; font-size:0.6em;">hopefully autohinted</span></p>
    4444      </li>
     45
     46      <li>
     47        <p>The following text should show that fontconfig can be used to enable
     48        or disable subpixel rendering.</p>
     49
     50        <p><span style="font-family:SubpixelEnabledArial">subpixel</span> <i>vs</i> <span style="font-family:SubpixelDisabledArial">no subpixel</span></p>
     51      </li>
    4552    </ol>
    4653  </body>
  • trunk/WebCore/ChangeLog

    r63779 r63780  
     12010-07-20  Daniel Erat  <derat@chromium.org>
     2
     3        Reviewed by Ojan Vafai.
     4
     5        Subpixel rendering always disabled for Chromium Linux
     6        https://bugs.webkit.org/show_bug.cgi?id=42220
     7
     8        Explicitly initialize global Chromium Linux isSkiaSubpixelGlyphs
     9        flag to false for clarity.
     10
     11        * platform/graphics/chromium/FontPlatformDataLinux.cpp:
     12
    1132010-07-20  Adam Barth  <abarth@webkit.org>
    214
  • trunk/WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp

    r62122 r63780  
    4444
    4545static SkPaint::Hinting skiaHinting = SkPaint::kNormal_Hinting;
    46 static bool isSkiaAntiAlias = true, isSkiaSubpixelGlyphs;
     46static bool isSkiaAntiAlias = true;
     47static bool isSkiaSubpixelGlyphs = false;
    4748
    4849void FontPlatformData::setHinting(SkPaint::Hinting hinting)
  • trunk/WebKit/chromium/ChangeLog

    r63770 r63780  
     12010-07-20  Daniel Erat  <derat@chromium.org>
     2
     3        Reviewed by Ojan Vafai.
     4
     5        Subpixel rendering always disabled for Chromium Linux
     6        https://bugs.webkit.org/show_bug.cgi?id=42220
     7
     8        Honor Fontconfig subpixel rendering setting on Chromium Linux.
     9
     10        * src/gtk/WebFontInfo.cpp:
     11        (WebKit::WebFontInfo::renderStyleForStrike):
     12
    1132010-07-20  Darin Fisher  <darin@chromium.org>
    214
  • trunk/WebKit/chromium/src/gtk/WebFontInfo.cpp

    r55089 r63780  
    166166    if (FcPatternGetInteger(match, FC_HINT_STYLE, 0, &i) == FcResultMatch)
    167167        out->hintStyle = i;
     168    if (FcPatternGetInteger(match, FC_RGBA, 0, &i) == FcResultMatch) {
     169        switch (i) {
     170        case FC_RGBA_NONE:
     171            out->useSubpixel = 0;
     172            break;
     173        case FC_RGBA_RGB:
     174        case FC_RGBA_BGR:
     175        case FC_RGBA_VRGB:
     176        case FC_RGBA_VBGR:
     177            out->useSubpixel = 1;
     178            break;
     179        default:
     180            // This includes FC_RGBA_UNKNOWN.
     181            out->useSubpixel = 2;
     182            break;
     183        }
     184    }
    168185
    169186    FcPatternDestroy(match);
Note: See TracChangeset for help on using the changeset viewer.