From a2b3ae23556fb2f1adbc008574f33bf365476af9 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 18 Aug 2015 16:02:32 -0700 Subject: Fix mac build after commit e1ce94e. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1297303002 . --- core/src/fpdfapi/fpdf_font/fpdf_font.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'core/src/fpdfapi') diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp index 37b0c019a5..a228cf76ec 100644 --- a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp +++ b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp @@ -1090,13 +1090,13 @@ void CPDF_Type1Font::LoadGlyphMap() { FX_BOOL bCoreText = TRUE; CQuartz2D& quartz2d = ((CApplePlatform*)CFX_GEModule::Get()->GetPlatformData())->_quartz2d; - if (!m_Font.m_pPlatformFont) { + if (!m_Font.GetPlatformFont()) { if (m_Font.GetPsName() == CFX_WideString::FromLocal("DFHeiStd-W5")) { bCoreText = FALSE; } - m_Font.m_pPlatformFont = - quartz2d.CreateFont(m_Font.m_pFontData, m_Font.m_dwSize); - if (NULL == m_Font.m_pPlatformFont) { + m_Font.SetPlatformFont( + quartz2d.CreateFont(m_Font.GetFontData(), m_Font.GetSize())); + if (!m_Font.GetPlatformFont()) { bCoreText = FALSE; } } @@ -1119,7 +1119,7 @@ void CPDF_Type1Font::LoadGlyphMap() { kCFAllocatorDefault, name_glyph, kCFStringEncodingASCII, kCFAllocatorNull); m_ExtGID[charcode] = CGFontGetGlyphWithGlyphName( - (CGFontRef)m_Font.m_pPlatformFont, name_ct); + (CGFontRef)m_Font.GetPlatformFont(), name_ct); if (name_ct) { CFRelease(name_ct); } @@ -1161,7 +1161,7 @@ void CPDF_Type1Font::LoadGlyphMap() { kCFAllocatorDefault, name_glyph, kCFStringEncodingASCII, kCFAllocatorNull); m_ExtGID[charcode] = CGFontGetGlyphWithGlyphName( - (CGFontRef)m_Font.m_pPlatformFont, name_ct); + (CGFontRef)m_Font.GetPlatformFont(), name_ct); if (name_ct) { CFRelease(name_ct); } @@ -1178,7 +1178,7 @@ void CPDF_Type1Font::LoadGlyphMap() { kCFAllocatorDefault, name_glyph, kCFStringEncodingASCII, kCFAllocatorNull); m_ExtGID[charcode] = CGFontGetGlyphWithGlyphName( - (CGFontRef)m_Font.m_pPlatformFont, name_ct); + (CGFontRef)m_Font.GetPlatformFont(), name_ct); if (name_ct) { CFRelease(name_ct); } @@ -1207,7 +1207,7 @@ void CPDF_Type1Font::LoadGlyphMap() { kCFAllocatorDefault, name, kCFStringEncodingASCII, kCFAllocatorNull); m_ExtGID[charcode] = CGFontGetGlyphWithGlyphName( - (CGFontRef)m_Font.m_pPlatformFont, name_ct); + (CGFontRef)m_Font.GetPlatformFont(), name_ct); if (name_ct) { CFRelease(name_ct); } @@ -1232,7 +1232,7 @@ void CPDF_Type1Font::LoadGlyphMap() { kCFAllocatorDefault, name_glyph, kCFStringEncodingASCII, kCFAllocatorNull); m_ExtGID[charcode] = CGFontGetGlyphWithGlyphName( - (CGFontRef)m_Font.m_pPlatformFont, name_ct); + (CGFontRef)m_Font.GetPlatformFont(), name_ct); if (name_ct) { CFRelease(name_ct); } @@ -1261,7 +1261,7 @@ void CPDF_Type1Font::LoadGlyphMap() { CFStringRef name_ct = CFStringCreateWithCStringNoCopy( kCFAllocatorDefault, name, kCFStringEncodingASCII, kCFAllocatorNull); m_ExtGID[charcode] = CGFontGetGlyphWithGlyphName( - (CGFontRef)m_Font.m_pPlatformFont, name_ct); + (CGFontRef)m_Font.GetPlatformFont(), name_ct); if (name_ct) { CFRelease(name_ct); } @@ -1279,7 +1279,7 @@ void CPDF_Type1Font::LoadGlyphMap() { kCFAllocatorDefault, name_glyph, kCFStringEncodingASCII, kCFAllocatorNull); m_ExtGID[charcode] = CGFontGetGlyphWithGlyphName( - (CGFontRef)m_Font.m_pPlatformFont, name_ct); + (CGFontRef)m_Font.GetPlatformFont(), name_ct); if (name_ct) { CFRelease(name_ct); } @@ -1295,7 +1295,7 @@ void CPDF_Type1Font::LoadGlyphMap() { kCFAllocatorDefault, name_glyph, kCFStringEncodingASCII, kCFAllocatorNull); m_ExtGID[charcode] = CGFontGetGlyphWithGlyphName( - (CGFontRef)m_Font.m_pPlatformFont, name_ct); + (CGFontRef)m_Font.GetPlatformFont(), name_ct); if (name_ct) { CFRelease(name_ct); } -- cgit v1.2.3