| 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 16 matching lines...) Expand all Loading... |
| 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 */ | 28 */ |
| 29 | 29 |
| 30 #import "config.h" | 30 #import "config.h" |
| 31 #import "core/platform/graphics/FontCache.h" | 31 #import "core/platform/graphics/FontCache.h" |
| 32 | 32 |
| 33 #import <AppKit/AppKit.h> | 33 #import <AppKit/AppKit.h> |
| 34 #import "core/platform/graphics/Font.h" | 34 #import "core/platform/graphics/Font.h" |
| 35 #import "core/platform/graphics/FontPlatformData.h" | 35 #import "core/platform/graphics/FontPlatformData.h" |
| 36 #import "core/platform/graphics/SimpleFontData.h" | 36 #import "core/platform/graphics/SimpleFontData.h" |
| 37 #import "core/platform/mac/WebFontCache.h" | 37 #import "platform/mac/WebFontCache.h" |
| 38 #import <wtf/MainThread.h> | 38 #import <wtf/MainThread.h> |
| 39 #import <wtf/StdLibExtras.h> | 39 #import <wtf/StdLibExtras.h> |
| 40 | 40 |
| 41 // Forward declare Mac SPIs. | 41 // Forward declare Mac SPIs. |
| 42 // Request for public API: rdar://13803570 | 42 // Request for public API: rdar://13803570 |
| 43 @interface NSFont (WebKitSPI) | 43 @interface NSFont (WebKitSPI) |
| 44 + (NSFont*)findFontLike:(NSFont*)font forString:(NSString*)string withRange:(NSR
ange)range inLanguage:(id)useNil; | 44 + (NSFont*)findFontLike:(NSFont*)font forString:(NSString*)string withRange:(NSR
ange)range inLanguage:(id)useNil; |
| 45 + (NSFont*)findFontLike:(NSFont*)font forCharacter:(UniChar)uc inLanguage:(id)us
eNil; | 45 + (NSFont*)findFontLike:(NSFont*)font forCharacter:(UniChar)uc inLanguage:(id)us
eNil; |
| 46 @end | 46 @end |
| 47 | 47 |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 | 218 |
| 219 // FontPlatformData::font() can be null for the case of Chromium out-of-proc
ess font loading. | 219 // FontPlatformData::font() can be null for the case of Chromium out-of-proc
ess font loading. |
| 220 // In that case, we don't want to use the platformData. | 220 // In that case, we don't want to use the platformData. |
| 221 OwnPtr<FontPlatformData> platformData = adoptPtr(new FontPlatformData(platfo
rmFont, size, fontDescription.usePrinterFont(), syntheticBold, syntheticOblique,
fontDescription.orientation(), fontDescription.widthVariant())); | 221 OwnPtr<FontPlatformData> platformData = adoptPtr(new FontPlatformData(platfo
rmFont, size, fontDescription.usePrinterFont(), syntheticBold, syntheticOblique,
fontDescription.orientation(), fontDescription.widthVariant())); |
| 222 if (!platformData->font()) | 222 if (!platformData->font()) |
| 223 return 0; | 223 return 0; |
| 224 return platformData.leakPtr(); | 224 return platformData.leakPtr(); |
| 225 } | 225 } |
| 226 | 226 |
| 227 } // namespace WebCore | 227 } // namespace WebCore |
| OLD | NEW |