Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2246)

Unified Diff: core/src/fpdfapi/fpdf_font/fpdf_font.cpp

Issue 1297303002: Fix mac build after commit e1ce94e. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/include/fxge/fx_font.h ('k') | core/src/fxge/apple/fx_apple_platform.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_font/fpdf_font.cpp
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
index 37b0c019a5d46b94a3750a9b8a734ccf4f7506e6..a228cf76ec2b687c54b3d6d2ede3a0965e4f9cb5 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);
}
« no previous file with comments | « core/include/fxge/fx_font.h ('k') | core/src/fxge/apple/fx_apple_platform.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698