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

Unified Diff: Source/core/platform/graphics/chromium/FontPlatformDataChromiumWin.cpp

Issue 25639003: Add support for SubpixelFontScaling flag on windows (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing Created 7 years, 2 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/graphics/chromium/FontPlatformDataChromiumWin.cpp
diff --git a/Source/core/platform/graphics/chromium/FontPlatformDataChromiumWin.cpp b/Source/core/platform/graphics/chromium/FontPlatformDataChromiumWin.cpp
index 60bc76072bd1b36d7c1d2e80c20172ba98f03077..a7a8e81919abf1be01bfad464ae863917d5b04fd 100644
--- a/Source/core/platform/graphics/chromium/FontPlatformDataChromiumWin.cpp
+++ b/Source/core/platform/graphics/chromium/FontPlatformDataChromiumWin.cpp
@@ -32,6 +32,7 @@
#include "config.h"
#include "core/platform/graphics/FontPlatformData.h"
+#include "RuntimeEnabledFeatures.h"
#include "SkPaint.h"
#include "SkTypeface.h"
#include "SkTypeface_win.h"
@@ -58,6 +59,8 @@ 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())
+ paint->setSubpixelText(true);
// Only set painting flags when we're actually painting.
if (context) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698