Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 396 } | 396 } |
| 397 | 397 |
| 398 // List of fonts that look bad with subpixel text rendering at smaller font | 398 // List of fonts that look bad with subpixel text rendering at smaller font |
| 399 // sizes. This includes all fonts in the Microsoft Core fonts for the Web | 399 // sizes. This includes all fonts in the Microsoft Core fonts for the Web |
| 400 // collection. | 400 // collection. |
| 401 const static wchar_t* noSubpixelForSmallSizeFont[] = { | 401 const static wchar_t* noSubpixelForSmallSizeFont[] = { |
| 402 L"andale mono", | 402 L"andale mono", |
| 403 L"arial", | 403 L"arial", |
| 404 L"comic sans", | 404 L"comic sans", |
| 405 L"courier new", | 405 L"courier new", |
| 406 L"dotum", | |
|
eae
2015/08/31 17:39:01
You might want to remove it from the minAntiAliasS
| |
| 406 L"georgia", | 407 L"georgia", |
| 407 L"impact", | 408 L"impact", |
| 408 L"lucida console", | 409 L"lucida console", |
| 409 L"tahoma", | 410 L"tahoma", |
| 410 L"times new roman", | 411 L"times new roman", |
| 411 L"trebuchet ms", | 412 L"trebuchet ms", |
| 412 L"verdana", | 413 L"verdana", |
| 413 L"webdings" | 414 L"webdings" |
| 414 }; | 415 }; |
| 415 const static float minSizeForSubpixelForFont = 16.0f; | 416 const static float minSizeForSubpixelForFont = 16.0f; |
| 416 numFonts = WTF_ARRAY_LENGTH(noSubpixelForSmallSizeFont); | 417 numFonts = WTF_ARRAY_LENGTH(noSubpixelForSmallSizeFont); |
| 417 for (size_t i = 0; i < numFonts; i++) { | 418 for (size_t i = 0; i < numFonts; i++) { |
| 418 const wchar_t* family = noSubpixelForSmallSizeFont[i]; | 419 const wchar_t* family = noSubpixelForSmallSizeFont[i]; |
| 419 if (typefacesMatchesFamily(tf.get(), family)) { | 420 if (typefacesMatchesFamily(tf.get(), family)) { |
| 420 result->setMinSizeForSubpixel(minSizeForSubpixelForFont); | 421 result->setMinSizeForSubpixel(minSizeForSubpixelForFont); |
| 421 break; | 422 break; |
| 422 } | 423 } |
| 423 } | 424 } |
| 424 | 425 |
| 425 return result; | 426 return result; |
| 426 } | 427 } |
| 427 | 428 |
| 428 } // namespace blink | 429 } // namespace blink |
| OLD | NEW |