Index: Source/platform/fonts/win/FontPlatformDataWin.cpp |
diff --git a/Source/platform/fonts/win/FontPlatformDataWin.cpp b/Source/platform/fonts/win/FontPlatformDataWin.cpp |
index 398088717b3f0b834be87889025c04bfca422e70..621e25263c1704bd76dfaa602598f7212f50d097 100644 |
--- a/Source/platform/fonts/win/FontPlatformDataWin.cpp |
+++ b/Source/platform/fonts/win/FontPlatformDataWin.cpp |
@@ -64,13 +64,20 @@ void FontPlatformData::setupPaint(SkPaint* paint, GraphicsContext* context) cons |
if (ts >= m_minSizeForAntiAlias) { |
- // Subpixel text positioning looks pretty bad without font smoothing. |
- // Disable it unless some type of font smoothing is used. As most tests |
- // run without font smoothing we enable it for tests to ensure we get |
- // good test coverage matching the more common smoothing enabled |
- // behavior. |
- if (m_useSubpixelPositioning && ts >= m_minSizeForSubpixel |
- && ((textFlags & SkPaint::kAntiAlias_Flag) || LayoutTestSupport::isRunningLayoutTest())) |
+ if (m_useSubpixelPositioning |
+ // Disable subpixel text for certain older fonts at smaller sizes as |
+ // they tend to get quite blurry at non-integer sizes and positions. |
+ // For high-DPI this workaround isn't required. |
+ && (ts >= m_minSizeForSubpixel |
+ || FontCache::fontCache()->deviceScaleFactor() >= 1.5) |
+ |
+ // Subpixel text positioning looks pretty bad without font |
+ // smoothing. Disable it unless some type of font smoothing is used. |
+ // As most tests run without font smoothing we enable it for tests |
+ // to ensure we get good test coverage matching the more common |
+ // smoothing enabled behavior. |
+ && ((textFlags & SkPaint::kAntiAlias_Flag) |
+ || LayoutTestSupport::isRunningLayoutTest())) |
flags |= SkPaint::kSubpixelText_Flag; |
// Only set painting flags when we're actually painting. |