| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 | 115 |
| 116 // Given the desired base font, this will create a SimpleFontData for a specific | 116 // Given the desired base font, this will create a SimpleFontData for a specific |
| 117 // font that can be used to render the given range of characters. | 117 // font that can be used to render the given range of characters. |
| 118 PassRefPtr<SimpleFontData> FontCache::platformFallbackForCharacter(const FontDes
cription& fontDescription, UChar32 character, const SimpleFontData*) | 118 PassRefPtr<SimpleFontData> FontCache::platformFallbackForCharacter(const FontDes
cription& fontDescription, UChar32 character, const SimpleFontData*) |
| 119 { | 119 { |
| 120 // FIXME: Consider passing fontDescription.dominantScript() | 120 // FIXME: Consider passing fontDescription.dominantScript() |
| 121 // to GetFallbackFamily here. | 121 // to GetFallbackFamily here. |
| 122 UScriptCode script; | 122 UScriptCode script; |
| 123 const wchar_t* family = getFallbackFamily(character, | 123 const wchar_t* family = getFallbackFamily(character, |
| 124 fontDescription.genericFamily(), | 124 fontDescription.genericFamily(), |
| 125 &script); | 125 &script, |
| 126 m_fontManager.get()); |
| 126 FontPlatformData* data = 0; | 127 FontPlatformData* data = 0; |
| 127 if (family) | 128 if (family) |
| 128 data = getFontPlatformData(fontDescription, AtomicString(family, wcslen
(family))); | 129 data = getFontPlatformData(fontDescription, AtomicString(family, wcslen
(family))); |
| 129 | 130 |
| 130 // Last resort font list : PanUnicode. CJK fonts have a pretty | 131 // Last resort font list : PanUnicode. CJK fonts have a pretty |
| 131 // large repertoire. Eventually, we need to scan all the fonts | 132 // large repertoire. Eventually, we need to scan all the fonts |
| 132 // on the system to have a Firefox-like coverage. | 133 // on the system to have a Firefox-like coverage. |
| 133 // Make sure that all of them are lowercased. | 134 // Make sure that all of them are lowercased. |
| 134 const static wchar_t* const cjkFonts[] = { | 135 const static wchar_t* const cjkFonts[] = { |
| 135 L"arial unicode ms", | 136 L"arial unicode ms", |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 result->setMinSizeForAntiAlias( | 264 result->setMinSizeForAntiAlias( |
| 264 minSizeForAntiAlias(fontDescription.script())); | 265 minSizeForAntiAlias(fontDescription.script())); |
| 265 if (fontRequiresFullHinting(family)) | 266 if (fontRequiresFullHinting(family)) |
| 266 result->setHinting(SkPaint::kFull_Hinting); | 267 result->setHinting(SkPaint::kFull_Hinting); |
| 267 } | 268 } |
| 268 | 269 |
| 269 return result; | 270 return result; |
| 270 } | 271 } |
| 271 | 272 |
| 272 } | 273 } |
| OLD | NEW |