diff options
Diffstat (limited to 'WebCore/platform/graphics/cocoa')
-rw-r--r-- | WebCore/platform/graphics/cocoa/FontPlatformData.h | 10 | ||||
-rw-r--r-- | WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm | 10 |
2 files changed, 6 insertions, 14 deletions
diff --git a/WebCore/platform/graphics/cocoa/FontPlatformData.h b/WebCore/platform/graphics/cocoa/FontPlatformData.h index 7ab84f5..8cf08fb 100644 --- a/WebCore/platform/graphics/cocoa/FontPlatformData.h +++ b/WebCore/platform/graphics/cocoa/FontPlatformData.h @@ -63,7 +63,6 @@ class FontPlatformData { : m_syntheticBold(syntheticBold) , m_syntheticOblique(syntheticOblique) , m_orientation(orientation) - , m_atsuFontID(0) , m_size(size) , m_font(0) #ifdef BUILDING_ON_TIGER @@ -75,11 +74,10 @@ class FontPlatformData { FontPlatformData(NSFont *nsFont, float size, bool syntheticBold = false, bool syntheticOblique = false, FontOrientation = Horizontal); - FontPlatformData(CGFontRef cgFont, ATSUFontID fontID, float size, bool syntheticBold, bool syntheticOblique, FontOrientation orientation) + FontPlatformData(CGFontRef cgFont, float size, bool syntheticBold, bool syntheticOblique, FontOrientation orientation) : m_syntheticBold(syntheticBold) , m_syntheticOblique(syntheticOblique) , m_orientation(orientation) - , m_atsuFontID(fontID) , m_size(size) , m_font(0) , m_cgFont(cgFont) @@ -103,7 +101,6 @@ class FontPlatformData { bool m_syntheticOblique; FontOrientation m_orientation; - ATSUFontID m_atsuFontID; float m_size; unsigned hash() const @@ -118,7 +115,7 @@ class FontPlatformData { bool operator==(const FontPlatformData& other) const { return m_font == other.m_font && m_syntheticBold == other.m_syntheticBold && m_syntheticOblique == other.m_syntheticOblique && - m_cgFont == other.m_cgFont && m_size == other.m_size && m_atsuFontID == other.m_atsuFontID && m_orientation == other.m_orientation; + m_cgFont == other.m_cgFont && m_size == other.m_size && m_orientation == other.m_orientation; } NSFont *font() const { return m_font; } @@ -149,8 +146,7 @@ private: // * outNSFont - The font that was actually loaded, for the Chromium port this may be different than nsFont. // The caller is responsible for calling CFRelease() on this parameter when done with it. // * cgFont - CGFontRef representing the input font at the specified point size. - // * fontID - ID of loaded font. - void loadFont(NSFont* nsFont, float fontSize, NSFont*& outNSFont, CGFontRef& cgFont, ATSUFontID& fontID); + void loadFont(NSFont* nsFont, float fontSize, NSFont*& outNSFont, CGFontRef& cgFont); NSFont *m_font; diff --git a/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm b/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm index 52a88ed..8dacbe3 100644 --- a/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm +++ b/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm @@ -31,15 +31,13 @@ namespace WebCore { #if PLATFORM(MAC) -void FontPlatformData::loadFont(NSFont* nsFont, float, NSFont*& outNSFont, CGFontRef& cgFont, ATSUFontID& fontID) +void FontPlatformData::loadFont(NSFont* nsFont, float, NSFont*& outNSFont, CGFontRef& cgFont) { outNSFont = nsFont; #ifndef BUILDING_ON_TIGER cgFont = CTFontCopyGraphicsFont(toCTFontRef(nsFont), 0); - fontID = CTFontGetPlatformFont(toCTFontRef(nsFont), 0); #else cgFont = wkGetCGFontFromNSFont(nsFont); - fontID = wkGetNSFontATSUFontId(nsFont); #endif } #endif // PLATFORM(MAC) @@ -60,7 +58,7 @@ FontPlatformData::FontPlatformData(NSFont *nsFont, float size, bool syntheticBol ASSERT_ARG(nsFont, nsFont); CGFontRef cgFont = 0; - loadFont(nsFont, size, m_font, cgFont, m_atsuFontID); + loadFont(nsFont, size, m_font, cgFont); m_orientation = orientation; @@ -82,7 +80,6 @@ FontPlatformData::FontPlatformData(const FontPlatformData& f) m_syntheticOblique = f.m_syntheticOblique; m_size = f.m_size; m_cgFont = f.m_cgFont; - m_atsuFontID = f.m_atsuFontID; m_isColorBitmapFont = f.m_isColorBitmapFont; m_orientation = f.m_orientation; m_CTFont = f.m_CTFont; @@ -103,7 +100,6 @@ const FontPlatformData& FontPlatformData::operator=(const FontPlatformData& f) m_syntheticOblique = f.m_syntheticOblique; m_size = f.m_size; m_cgFont = f.m_cgFont; - m_atsuFontID = f.m_atsuFontID; if (m_font == f.m_font) return *this; if (f.m_font && f.m_font != reinterpret_cast<NSFont *>(-1)) @@ -136,7 +132,7 @@ void FontPlatformData::setFont(NSFont *font) CGFontRef cgFont = 0; NSFont* loadedFont = 0; - loadFont(m_font, m_size, loadedFont, cgFont, m_atsuFontID); + loadFont(m_font, m_size, loadedFont, cgFont); #if PLATFORM(CHROMIUM) && OS(DARWIN) // If loadFont replaced m_font with a fallback font, then release the |