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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007 Apple Computer, Inc. 2 * Copyright (C) 2006, 2007 Apple Computer, Inc.
3 * Copyright (c) 2006, 2007, 2008, 2009, 2012 Google Inc. All rights reserved. 3 * Copyright (c) 2006, 2007, 2008, 2009, 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 }; 241 };
242 size_t numFonts = WTF_ARRAY_LENGTH(minAntiAliasSizeForFont); 242 size_t numFonts = WTF_ARRAY_LENGTH(minAntiAliasSizeForFont);
243 for (size_t i = 0; i < numFonts; i++) { 243 for (size_t i = 0; i < numFonts; i++) {
244 FamilyMinSize entry = minAntiAliasSizeForFont[i]; 244 FamilyMinSize entry = minAntiAliasSizeForFont[i];
245 if (typefacesMatchesFamily(tf.get(), entry.family)) { 245 if (typefacesMatchesFamily(tf.get(), entry.family)) {
246 result->setMinSizeForAntiAlias(entry.minSize); 246 result->setMinSizeForAntiAlias(entry.minSize);
247 break; 247 break;
248 } 248 }
249 } 249 }
250 250
251 // List of fonts that look bad with subpixel text rendering at smaller font
252 // sizes. This includes all fonts in the Microsoft Core fonts for the Web
253 // collection.
254 const static wchar_t* noSubpixelForSmallSizeFont[] = {
255 L"andale mono",
256 L"arial",
257 L"comic sans",
258 L"courier new",
259 L"georgia",
260 L"impact",
261 L"lucida console",
262 L"tahoma",
263 L"times new roman",
264 L"trebuchet ms",
265 L"verdana",
266 L"webdings"
267 };
268 const static float minSizeForSubpixelForFont = 16.0f;
269 numFonts = WTF_ARRAY_LENGTH(noSubpixelForSmallSizeFont);
270 for (size_t i = 0; i < numFonts; i++) {
271 const wchar_t* family = noSubpixelForSmallSizeFont[i];
272 if (typefacesMatchesFamily(tf.get(), family)) {
273 result->setMinSizeForSubpixel(minSizeForSubpixelForFont);
274 break;
275 }
276 }
277
251 return result; 278 return result;
252 } 279 }
253 280
254 } // namespace blink 281 } // namespace blink
OLDNEW
« 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