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

Unified Diff: Source/platform/fonts/win/FontCacheSkiaWin.cpp

Issue 556313002: Merge 181492 "[DirectWrite] Disable subpixel font positioning fo..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/2125/
Patch Set: Created 6 years, 3 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
Index: Source/platform/fonts/win/FontCacheSkiaWin.cpp
===================================================================
--- Source/platform/fonts/win/FontCacheSkiaWin.cpp (revision 181738)
+++ Source/platform/fonts/win/FontCacheSkiaWin.cpp (working copy)
@@ -248,6 +248,33 @@
}
}
+ // 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[] = {
+ L"andale mono",
+ L"arial",
+ L"comic sans",
+ L"courier new",
+ L"georgia",
+ L"impact",
+ L"lucida console",
+ L"tahoma",
+ L"times new roman",
+ L"trebuchet ms",
+ L"verdana",
+ L"webdings"
+ };
+ 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;
}
« no previous file with comments | « Source/platform/fonts/harfbuzz/FontPlatformDataHarfBuzz.cpp ('k') | Source/platform/fonts/win/FontPlatformDataWin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698