| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 // so we can respect the settings for users who turn off smoothing. | 114 // so we can respect the settings for users who turn off smoothing. |
| 115 gFlags = SkPaint::kAntiAlias_Flag | SkPaint::kLCDRenderText_Flag; | 115 gFlags = SkPaint::kAntiAlias_Flag | SkPaint::kLCDRenderText_Flag; |
| 116 } | 116 } |
| 117 gInited = true; | 117 gInited = true; |
| 118 } | 118 } |
| 119 return gFlags; | 119 return gFlags; |
| 120 } | 120 } |
| 121 | 121 |
| 122 static bool isWebFont(const String& familyName) | 122 static bool isWebFont(const String& familyName) |
| 123 { | 123 { |
| 124 // Web-fonts have artifical names constructed to always be: | 124 // Web-fonts have artificial names constructed to always be: |
| 125 // 1. 24 characters, followed by a '\0' | 125 // 1. 24 characters, followed by a '\0' |
| 126 // 2. the last two characters are '==' | 126 // 2. the last two characters are '==' |
| 127 return familyName.length() == 24 | 127 return familyName.length() == 24 |
| 128 && '=' == familyName[22] && '=' == familyName[23]; | 128 && '=' == familyName[22] && '=' == familyName[23]; |
| 129 } | 129 } |
| 130 | 130 |
| 131 static int computePaintTextFlags(String fontFamilyName) | 131 static int computePaintTextFlags(String fontFamilyName) |
| 132 { | 132 { |
| 133 if (LayoutTestSupport::isRunningLayoutTest()) | 133 if (LayoutTestSupport::isRunningLayoutTest()) |
| 134 return LayoutTestSupport::isFontAntialiasingEnabledForTest() ? SkPaint::
kAntiAlias_Flag : 0; | 134 return LayoutTestSupport::isFontAntialiasingEnabledForTest() ? SkPaint::
kAntiAlias_Flag : 0; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 149 { | 149 { |
| 150 m_paintTextFlags = computePaintTextFlags(fontFamilyName()); | 150 m_paintTextFlags = computePaintTextFlags(fontFamilyName()); |
| 151 } | 151 } |
| 152 | 152 |
| 153 bool FontPlatformData::defaultUseSubpixelPositioning() | 153 bool FontPlatformData::defaultUseSubpixelPositioning() |
| 154 { | 154 { |
| 155 return FontCache::fontCache()->useSubpixelPositioning(); | 155 return FontCache::fontCache()->useSubpixelPositioning(); |
| 156 } | 156 } |
| 157 | 157 |
| 158 } // namespace blink | 158 } // namespace blink |
| OLD | NEW |