OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 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 20 matching lines...) Expand all Loading... |
31 #import "FontCache.h" | 31 #import "FontCache.h" |
32 | 32 |
33 #import "Font.h" | 33 #import "Font.h" |
34 #import "SimpleFontData.h" | 34 #import "SimpleFontData.h" |
35 #import "FontPlatformData.h" | 35 #import "FontPlatformData.h" |
36 #import "WebCoreSystemInterface.h" | 36 #import "WebCoreSystemInterface.h" |
37 #import "WebFontCache.h" | 37 #import "WebFontCache.h" |
38 #import <AppKit/AppKit.h> | 38 #import <AppKit/AppKit.h> |
39 #import <wtf/StdLibExtras.h> | 39 #import <wtf/StdLibExtras.h> |
40 | 40 |
41 #if PLATFORM(CHROMIUM) | |
42 #include "ChromiumBridge.h" | |
43 #endif | |
44 | |
45 #ifdef BUILDING_ON_TIGER | 41 #ifdef BUILDING_ON_TIGER |
46 typedef int NSInteger; | 42 typedef int NSInteger; |
47 #endif | 43 #endif |
48 | 44 |
49 namespace WebCore { | 45 namespace WebCore { |
50 | 46 |
51 static void fontCacheATSNotificationCallback(ATSFontNotificationInfoRef, void*) | 47 static void fontCacheATSNotificationCallback(ATSFontNotificationInfoRef, void*) |
52 { | 48 { |
53 fontCache()->invalidate(); | 49 fontCache()->invalidate(); |
54 } | 50 } |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 actualTraits = [fontManager traitsOfFont:nsFont]; | 192 actualTraits = [fontManager traitsOfFont:nsFont]; |
197 NSInteger actualWeight = [fontManager weightOfFont:nsFont]; | 193 NSInteger actualWeight = [fontManager weightOfFont:nsFont]; |
198 | 194 |
199 NSFont *platformFont = fontDescription.usePrinterFont() ? [nsFont printerFon
t] : [nsFont screenFont]; | 195 NSFont *platformFont = fontDescription.usePrinterFont() ? [nsFont printerFon
t] : [nsFont screenFont]; |
200 bool syntheticBold = isAppKitFontWeightBold(weight) && !isAppKitFontWeightBo
ld(actualWeight); | 196 bool syntheticBold = isAppKitFontWeightBold(weight) && !isAppKitFontWeightBo
ld(actualWeight); |
201 bool syntheticOblique = (traits & NSFontItalicTrait) && !(actualTraits & NSF
ontItalicTrait); | 197 bool syntheticOblique = (traits & NSFontItalicTrait) && !(actualTraits & NSF
ontItalicTrait); |
202 | 198 |
203 return new FontPlatformData(platformFont, syntheticBold, syntheticOblique); | 199 return new FontPlatformData(platformFont, syntheticBold, syntheticOblique); |
204 } | 200 } |
205 | 201 |
206 // TODO(jungshik): This may not be the best place to put this function. See Font
Cache.h. | |
207 AtomicString FontCache::getGenericFontForScript(UScriptCode script, const FontDe
scription& description) | |
208 { | |
209 #if PLATFORM(CHROMIUM) | |
210 if (ChromiumBridge::layoutTestMode()) | |
211 return emptyAtom; | |
212 #endif | |
213 // TODO(pinkerton) -- flesh this out with some script handling code | |
214 return emptyAtom; | |
215 } | |
216 | |
217 } // namespace WebCore | 202 } // namespace WebCore |
218 | |
219 | |
OLD | NEW |