OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 Google Inc. All rights reserved. | 2 * Copyright (c) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 sk_sp<SkFontMgr> fm(SkFontMgr::RefDefault()); | 53 sk_sp<SkFontMgr> fm(SkFontMgr::RefDefault()); |
54 return defaultFontFamily(fm.get()); | 54 return defaultFontFamily(fm.get()); |
55 } | 55 } |
56 | 56 |
57 // static | 57 // static |
58 const AtomicString& FontCache::systemFontFamily() { | 58 const AtomicString& FontCache::systemFontFamily() { |
59 DEFINE_STATIC_LOCAL(AtomicString, systemFontFamily, (defaultFontFamily())); | 59 DEFINE_STATIC_LOCAL(AtomicString, systemFontFamily, (defaultFontFamily())); |
60 return systemFontFamily; | 60 return systemFontFamily; |
61 } | 61 } |
62 | 62 |
| 63 // static |
| 64 void FontCache::setSystemFontFamily(const AtomicString&) {} |
| 65 |
63 PassRefPtr<SimpleFontData> FontCache::fallbackFontForCharacter( | 66 PassRefPtr<SimpleFontData> FontCache::fallbackFontForCharacter( |
64 const FontDescription& fontDescription, | 67 const FontDescription& fontDescription, |
65 UChar32 c, | 68 UChar32 c, |
66 const SimpleFontData*, | 69 const SimpleFontData*, |
67 FontFallbackPriority fallbackPriority) { | 70 FontFallbackPriority fallbackPriority) { |
68 sk_sp<SkFontMgr> fm(SkFontMgr::RefDefault()); | 71 sk_sp<SkFontMgr> fm(SkFontMgr::RefDefault()); |
69 AtomicString familyName = | 72 AtomicString familyName = |
70 getFamilyNameForCharacter(fm.get(), c, fontDescription, fallbackPriority); | 73 getFamilyNameForCharacter(fm.get(), c, fontDescription, fallbackPriority); |
71 if (familyName.isEmpty()) | 74 if (familyName.isEmpty()) |
72 return getLastResortFallbackFont(fontDescription, DoNotRetain); | 75 return getLastResortFallbackFont(fontDescription, DoNotRetain); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 // For other scripts, use the default generic family mapping logic. | 114 // For other scripts, use the default generic family mapping logic. |
112 return familyName; | 115 return familyName; |
113 } | 116 } |
114 | 117 |
115 sk_sp<SkFontMgr> fm(SkFontMgr::RefDefault()); | 118 sk_sp<SkFontMgr> fm(SkFontMgr::RefDefault()); |
116 return getFamilyNameForCharacter(fm.get(), examplerChar, fontDescription, | 119 return getFamilyNameForCharacter(fm.get(), examplerChar, fontDescription, |
117 FontFallbackPriority::Text); | 120 FontFallbackPriority::Text); |
118 } | 121 } |
119 | 122 |
120 } // namespace blink | 123 } // namespace blink |
OLD | NEW |