Index: Source/platform/fonts/win/FontCacheSkiaWin.cpp |
diff --git a/Source/platform/fonts/win/FontCacheSkiaWin.cpp b/Source/platform/fonts/win/FontCacheSkiaWin.cpp |
index 1d2f3e853d0018002db197a344e6e6c50d7fdabd..ae763bc79e00cb1b7d607e83207e4f734d12dcb0 100644 |
--- a/Source/platform/fonts/win/FontCacheSkiaWin.cpp |
+++ b/Source/platform/fonts/win/FontCacheSkiaWin.cpp |
@@ -248,6 +248,33 @@ FontPlatformData* FontCache::createFontPlatformData(const FontDescription& fontD |
} |
} |
+ // List of fonts that look bad with subpixel text rendering at smaller font |
+ // sizes. This includes all fonts in the Microsoft Core fonts for the Web |
+ // collection. |
+ const static wchar_t* noSubpixelForSmallSizeFont[] = { |
scottmg
2014/09/05 16:55:41
nit; sort this list
|
+ L"arial", |
+ L"courier new", |
+ L"times new roman", |
+ L"andale mono", |
+ L"comic sans", |
+ L"impact", |
+ L"georgia", |
+ L"trebuchet", |
scottmg
2014/09/05 16:55:41
does this need to be "trebuchet ms"?
|
+ L"verdana", |
+ L"webdings", |
+ L"tahoma", |
+ L"lucida console" |
+ }; |
+ const static float minSizeForSubpixelForFont = 16.0f; |
+ numFonts = WTF_ARRAY_LENGTH(noSubpixelForSmallSizeFont); |
+ for (size_t i = 0; i < numFonts; i++) { |
+ const wchar_t* family = noSubpixelForSmallSizeFont[i]; |
+ if (typefacesMatchesFamily(tf.get(), family)) { |
+ result->setMinSizeForSubpixel(minSizeForSubpixelForFont); |
+ break; |
+ } |
+ } |
+ |
return result; |
} |