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

Unified Diff: Source/core/platform/graphics/win/FontPlatformDataWin.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/win/FontPlatformDataWin.cpp
diff --git a/Source/core/platform/graphics/win/FontPlatformDataWin.cpp b/Source/core/platform/graphics/win/FontPlatformDataWin.cpp
index 6bf3d6456404b1fecfda3276993cb90d29923b44..f33a454e8a36695f3c9acf72659aeafc9d58cefb 100644
--- a/Source/core/platform/graphics/win/FontPlatformDataWin.cpp
+++ b/Source/core/platform/graphics/win/FontPlatformDataWin.cpp
@@ -58,7 +58,10 @@ void FontPlatformData::setupPaint(SkPaint* paint, GraphicsContext* context) cons
paint->setTypeface(typeface());
paint->setFakeBoldText(m_fakeBold);
paint->setTextSkewX(m_fakeItalic ? -SK_Scalar1 / 4 : 0);
- if (RuntimeEnabledFeatures::subpixelFontScalingEnabled())
+
+ // Subpixel text positioning is not supported by the GDI backend.
+ if (RuntimeEnabledFeatures::directWriteEnabled()
+ && RuntimeEnabledFeatures::subpixelFontScalingEnabled())
paint->setSubpixelText(true);
int textFlags = paintTextFlags();
« no previous file with comments | « Source/core/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp ('k') | Source/core/rendering/LineWidth.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698