| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 : 0; | 99 : 0; |
| 100 | 100 |
| 101 int textFlags = 0; | 101 int textFlags = 0; |
| 102 if (FontCache::fontCache()->antialiasedTextEnabled()) { | 102 if (FontCache::fontCache()->antialiasedTextEnabled()) { |
| 103 int lcdFlag = FontCache::fontCache()->lcdTextEnabled() | 103 int lcdFlag = FontCache::fontCache()->lcdTextEnabled() |
| 104 ? SkPaint::kLCDRenderText_Flag | 104 ? SkPaint::kLCDRenderText_Flag |
| 105 : 0; | 105 : 0; |
| 106 textFlags = SkPaint::kAntiAlias_Flag | lcdFlag; | 106 textFlags = SkPaint::kAntiAlias_Flag | lcdFlag; |
| 107 } | 107 } |
| 108 | 108 |
| 109 // Many web-fonts are so poorly hinted that they are terrible to read when dra
wn in BW. | 109 // Many web-fonts are so poorly hinted that they are terrible to read when |
| 110 // In these cases, we have decided to FORCE these fonts to be drawn with at le
ast grayscale AA, | 110 // drawn in BW. In these cases, we have decided to FORCE these fonts to be |
| 111 // even when the System (getSystemTextFlags) tells us to draw only in BW. | 111 // drawn with at least grayscale AA, even when the System (getSystemTextFlags) |
| 112 // tells us to draw only in BW. |
| 112 if (isWebFont(fontFamilyName)) | 113 if (isWebFont(fontFamilyName)) |
| 113 textFlags |= SkPaint::kAntiAlias_Flag; | 114 textFlags |= SkPaint::kAntiAlias_Flag; |
| 114 | 115 |
| 115 return textFlags; | 116 return textFlags; |
| 116 } | 117 } |
| 117 | 118 |
| 118 void FontPlatformData::querySystemForRenderStyle() { | 119 void FontPlatformData::querySystemForRenderStyle() { |
| 119 m_paintTextFlags = computePaintTextFlags(fontFamilyName()); | 120 m_paintTextFlags = computePaintTextFlags(fontFamilyName()); |
| 120 } | 121 } |
| 121 | 122 |
| 122 } // namespace blink | 123 } // namespace blink |
| OLD | NEW |