diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-10-23 16:01:51 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-10-23 16:01:51 -0700 |
commit | 83d7e4812acc6f8dff9cd40b68f3a566d870f053 (patch) | |
tree | 734b23ab4dfa6a3144d6ef37743a536adfa0c1c1 /core/src/fxge | |
parent | e5457b7376e4f2b69c691363368af6cf4df3e0d8 (diff) | |
download | pdfium-83d7e4812acc6f8dff9cd40b68f3a566d870f053.tar.xz |
Take fx_apple_platform.cpp from master
Also fx_quartz_device.cpp
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1424613002 .
Diffstat (limited to 'core/src/fxge')
-rw-r--r-- | core/src/fxge/apple/fx_apple_platform.cpp | 10 | ||||
-rw-r--r-- | core/src/fxge/apple/fx_quartz_device.cpp | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/core/src/fxge/apple/fx_apple_platform.cpp b/core/src/fxge/apple/fx_apple_platform.cpp index 95cd1a1dd8..03b5629d4b 100644 --- a/core/src/fxge/apple/fx_apple_platform.cpp +++ b/core/src/fxge/apple/fx_apple_platform.cpp @@ -64,13 +64,13 @@ static FX_BOOL _CGDrawGlyphRun(CGContextRef pContext, } CQuartz2D& quartz2d = ((CApplePlatform*)CFX_GEModule::Get()->GetPlatformData())->_quartz2d; - if (!pFont->m_pPlatformFont) { + if (!pFont->GetPlatformFont()) { if (pFont->GetPsName() == CFX_WideString::FromLocal("DFHeiStd-W5")) { return FALSE; } - pFont->m_pPlatformFont = - quartz2d.CreateFont(pFont->m_pFontData, pFont->m_dwSize); - if (NULL == pFont->m_pPlatformFont) { + pFont->SetPlatformFont( + quartz2d.CreateFont(pFont->GetFontData(), pFont->GetSize())); + if (!pFont->GetPlatformFont()) { return FALSE; } } @@ -92,7 +92,7 @@ static FX_BOOL _CGDrawGlyphRun(CGContextRef pContext, new_matrix.d = -new_matrix.d; } quartz2d.setGraphicsTextMatrix(pContext, &new_matrix); - return quartz2d.drawGraphicsString(pContext, pFont->m_pPlatformFont, + return quartz2d.drawGraphicsString(pContext, pFont->GetPlatformFont(), font_size, glyph_indices, glyph_positions, nChars, argb, NULL); } diff --git a/core/src/fxge/apple/fx_quartz_device.cpp b/core/src/fxge/apple/fx_quartz_device.cpp index 61a0cef543..eba27c0049 100644 --- a/core/src/fxge/apple/fx_quartz_device.cpp +++ b/core/src/fxge/apple/fx_quartz_device.cpp @@ -751,13 +751,13 @@ FX_BOOL CFX_QuartzDeviceDriver::CG_DrawGlypRun( } CQuartz2D& quartz2d = ((CApplePlatform*)CFX_GEModule::Get()->GetPlatformData())->_quartz2d; - if (!pFont->m_pPlatformFont) { + if (!pFont->GetPlatformFont()) { if (pFont->GetPsName() == CFX_WideString::FromLocal("DFHeiStd-W5")) { return FALSE; } - pFont->m_pPlatformFont = - quartz2d.CreateFont(pFont->m_pFontData, pFont->m_dwSize); - if (NULL == pFont->m_pPlatformFont) { + pFont->SetPlatformFont( + quartz2d.CreateFont(pFont->GetFontData(), pFont->GetSize())); + if (!pFont->GetPlatformFont()) { return FALSE; } } @@ -777,7 +777,7 @@ FX_BOOL CFX_QuartzDeviceDriver::CG_DrawGlypRun( text_matrix.d, text_matrix.e, text_matrix.f); matrix_cg = CGAffineTransformConcat(matrix_cg, _foxitDevice2User); CGContextSetTextMatrix(_context, matrix_cg); - CGContextSetFont(_context, (CGFontRef)pFont->m_pPlatformFont); + CGContextSetFont(_context, (CGFontRef)pFont->GetPlatformFont()); CGContextSetFontSize(_context, FXSYS_fabs(font_size)); int32_t a, r, g, b; ArgbDecode(argb, a, r, g, b); |