OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 DEFINE_STATIC_LOCAL(AtomicString, systemFontFamily, ()); | 47 DEFINE_STATIC_LOCAL(AtomicString, systemFontFamily, ()); |
48 return systemFontFamily; | 48 return systemFontFamily; |
49 } | 49 } |
50 | 50 |
51 // static | 51 // static |
52 const AtomicString& FontCache::systemFontFamily() { | 52 const AtomicString& FontCache::systemFontFamily() { |
53 return mutableSystemFontFamily(); | 53 return mutableSystemFontFamily(); |
54 } | 54 } |
55 | 55 |
56 // static | 56 // static |
57 void FontCache::setSystemFontFamily(const char* familyName) { | 57 void FontCache::setSystemFontFamily(const AtomicString& familyName) { |
58 DCHECK(familyName && *familyName); | 58 DCHECK(!familyName.isEmpty()); |
59 mutableSystemFontFamily() = familyName; | 59 mutableSystemFontFamily() = familyName; |
60 } | 60 } |
61 | 61 |
62 void FontCache::getFontForCharacter( | 62 void FontCache::getFontForCharacter( |
63 UChar32 c, | 63 UChar32 c, |
64 const char* preferredLocale, | 64 const char* preferredLocale, |
65 FontCache::PlatformFallbackFont* fallbackFont) { | 65 FontCache::PlatformFallbackFont* fallbackFont) { |
66 if (Platform::current()->sandboxSupport()) { | 66 if (Platform::current()->sandboxSupport()) { |
67 WebFallbackFont webFallbackFont; | 67 WebFallbackFont webFallbackFont; |
68 Platform::current()->sandboxSupport()->getFallbackFontForCharacter( | 68 Platform::current()->sandboxSupport()->getFallbackFontForCharacter( |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 std::unique_ptr<FontPlatformData> platformData( | 167 std::unique_ptr<FontPlatformData> platformData( |
168 new FontPlatformData(*substitutePlatformData)); | 168 new FontPlatformData(*substitutePlatformData)); |
169 platformData->setSyntheticBold(shouldSetSyntheticBold); | 169 platformData->setSyntheticBold(shouldSetSyntheticBold); |
170 platformData->setSyntheticItalic(shouldSetSyntheticItalic); | 170 platformData->setSyntheticItalic(shouldSetSyntheticItalic); |
171 return fontDataFromFontPlatformData(platformData.get(), DoNotRetain); | 171 return fontDataFromFontPlatformData(platformData.get(), DoNotRetain); |
172 } | 172 } |
173 | 173 |
174 #endif // !OS(ANDROID) | 174 #endif // !OS(ANDROID) |
175 | 175 |
176 } // namespace blink | 176 } // namespace blink |
OLD | NEW |