Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1508)

Unified Diff: Source/core/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp

Issue 25512005: Enable experimental support for sub-pixel font scaling (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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());
« no previous file with comments | « Source/core/platform/graphics/FontFastPath.cpp ('k') | Source/core/platform/graphics/win/FontPlatformDataWin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698