Index: Source/core/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp |
diff --git a/Source/core/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp b/Source/core/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp |
index 31634171635a2136450b864e1a0f477cec241efb..48d43c7dde5e099099f18b58c8290493875b2769 100644 |
--- a/Source/core/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp |
+++ b/Source/core/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp |
@@ -190,10 +190,15 @@ void FontPlatformData::setupPaint(SkPaint* paint, GraphicsContext* context) cons |
paint->setHinting(static_cast<SkPaint::Hinting>(m_style.hintStyle)); |
paint->setEmbeddedBitmapText(m_style.useBitmaps); |
paint->setAutohinted(m_style.useAutoHint); |
- paint->setSubpixelText(m_style.useSubpixelPositioning); |
if (m_style.useAntiAlias) |
paint->setLCDRenderText(m_style.useSubpixelRendering); |
+ // TestRunner specifically toggles the subpixel positioning flag. |
+ if (RuntimeEnabledFeatures::subpixelFontScalingEnabled() && !isRunningLayoutTest()) |
+ paint->setSubpixelText(true); |
+ else |
+ paint->setSubpixelText(m_style.useSubpixelPositioning); |
+ |
const float ts = m_textSize >= 0 ? m_textSize : 12; |
paint->setTextSize(SkFloatToScalar(ts)); |
paint->setTypeface(m_typeface.get()); |