Changeset 109137 in webkit
- Timestamp:
- Feb 28, 2012 12:28:53 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r109134 r109137 1 2012-02-28 Ned Holbrook <nholbrook@apple.com> 2 3 Reimplement pathFromFont() in SimpleFontDataMac.mm 4 https://bugs.webkit.org/show_bug.cgi?id=79811 5 6 Reviewed by Dan Bernstein. 7 8 Debug-only function, so no new tests. 9 10 * platform/graphics/mac/SimpleFontDataMac.mm: 11 (WebCore::pathFromFont): Reimplemented. 12 1 13 2012-02-28 Alexis Menard <alexis.menard@openbossa.org> 2 14 -
trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm
r109080 r109137 83 83 84 84 #if !ERROR_DISABLED 85 #if defined(__LP64__) || (!defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)) 86 static NSString* pathFromFont(NSFont*) 87 { 88 // FMGetATSFontRefFromFont is not available. As pathFromFont is only used for debugging purposes, 89 // returning nil is acceptable. 90 return nil; 91 } 92 #else 93 static NSString* pathFromFont(NSFont *font) 94 { 95 ATSFontRef atsFont = FMGetATSFontRefFromFont(CTFontGetPlatformFont(toCTFontRef(font), 0)); 96 FSRef fileRef; 97 98 OSStatus status = ATSFontGetFileReference(atsFont, &fileRef); 99 if (status != noErr) 100 return nil; 101 102 UInt8 filePathBuffer[PATH_MAX]; 103 status = FSRefMakePath(&fileRef, filePathBuffer, PATH_MAX); 104 if (status == noErr) 105 return [NSString stringWithUTF8String:(const char*)filePathBuffer]; 106 107 return nil; 108 } 109 #endif // __LP64__ 85 static NSString *pathFromFont(NSFont *font) 86 { 87 return [[[font fontDescriptor] objectForKey:(NSString *)kCTFontURLAttribute] path]; 88 } 110 89 #endif // !ERROR_DISABLED 111 90
Note: See TracChangeset
for help on using the changeset viewer.