| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
| 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 | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 void FontCache::platformInit() | 89 void FontCache::platformInit() |
| 90 { | 90 { |
| 91 CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), this,
fontCacheRegisteredFontsChangedNotificationCallback, kCTFontManagerRegisteredFon
tsChangedNotification, 0, CFNotificationSuspensionBehaviorDeliverImmediately); | 91 CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), this,
fontCacheRegisteredFontsChangedNotificationCallback, kCTFontManagerRegisteredFon
tsChangedNotification, 0, CFNotificationSuspensionBehaviorDeliverImmediately); |
| 92 } | 92 } |
| 93 | 93 |
| 94 static inline bool isAppKitFontWeightBold(NSInteger appKitFontWeight) | 94 static inline bool isAppKitFontWeightBold(NSInteger appKitFontWeight) |
| 95 { | 95 { |
| 96 return appKitFontWeight >= 7; | 96 return appKitFontWeight >= 7; |
| 97 } | 97 } |
| 98 | 98 |
| 99 void FontCache::acceptLanguagesChanged(const String&) {} | |
| 100 | |
| 101 PassRefPtr<SimpleFontData> FontCache::fallbackFontForCharacter(const FontDescrip
tion& fontDescription, UChar32 character, const SimpleFontData* fontDataToSubsti
tute) | 99 PassRefPtr<SimpleFontData> FontCache::fallbackFontForCharacter(const FontDescrip
tion& fontDescription, UChar32 character, const SimpleFontData* fontDataToSubsti
tute) |
| 102 { | 100 { |
| 103 // FIXME: We should fix getFallbackFamily to take a UChar32 | 101 // FIXME: We should fix getFallbackFamily to take a UChar32 |
| 104 // and remove this split-to-UChar16 code. | 102 // and remove this split-to-UChar16 code. |
| 105 UChar codeUnits[2]; | 103 UChar codeUnits[2]; |
| 106 int codeUnitsLength; | 104 int codeUnitsLength; |
| 107 if (character <= 0xFFFF) { | 105 if (character <= 0xFFFF) { |
| 108 codeUnits[0] = character; | 106 codeUnits[0] = character; |
| 109 codeUnitsLength = 1; | 107 codeUnitsLength = 1; |
| 110 } else { | 108 } else { |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 for (size_t i = 0; i < WTF_ARRAY_LENGTH(kSymbolsAndMathFontsMac); ++i) | 242 for (size_t i = 0; i < WTF_ARRAY_LENGTH(kSymbolsAndMathFontsMac); ++i) |
| 245 returnVector.append(kSymbolsAndMathFontsMac[i]); | 243 returnVector.append(kSymbolsAndMathFontsMac[i]); |
| 246 break; | 244 break; |
| 247 default: | 245 default: |
| 248 ASSERT_NOT_REACHED(); | 246 ASSERT_NOT_REACHED(); |
| 249 } | 247 } |
| 250 return returnVector; | 248 return returnVector; |
| 251 } | 249 } |
| 252 | 250 |
| 253 } // namespace blink | 251 } // namespace blink |
| OLD | NEW |