summaryrefslogtreecommitdiff
path: root/xfa/src/fdp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-10-23 12:37:42 -0700
committerTom Sepez <tsepez@chromium.org>2015-10-23 12:37:42 -0700
commit1b04bcc6af13669920700322052fc4ab4fad47a2 (patch)
tree14a70efd6df9acf3e5e0a611415e95955f1b5d8f /xfa/src/fdp
parent2a4e4ce8efaf8b6466962eef292a9876c17976ad (diff)
downloadpdfium-1b04bcc6af13669920700322052fc4ab4fad47a2.tar.xz
XFA: Manually apply changes to fpdf_text.h and fx_font.h from master
Driven off of https://codereview.chromium.org/1398383002/ Then make the other files as similar as possible. Note that this required changes to xfa/ code, and required adding some Set() methods. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1411833003 .
Diffstat (limited to 'xfa/src/fdp')
-rw-r--r--xfa/src/fdp/src/fde/fde_gedevice.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/xfa/src/fdp/src/fde/fde_gedevice.cpp b/xfa/src/fdp/src/fde/fde_gedevice.cpp
index c50fcca1c6..f357f50ce5 100644
--- a/xfa/src/fdp/src/fde/fde_gedevice.cpp
+++ b/xfa/src/fdp/src/fde/fde_gedevice.cpp
@@ -165,7 +165,7 @@ FX_BOOL CFDE_FxgeDevice::DrawString(IFDE_Brush* pBrush,
FX_DWORD dwFontStyle = pFont->GetFontStyles();
CFX_Font FxFont;
CFX_SubstFont SubstFxFont;
- FxFont.m_pSubstFont = &SubstFxFont;
+ FxFont.SetSubstFont(&SubstFxFont);
SubstFxFont.m_Weight = dwFontStyle & FX_FONTSTYLE_Bold ? 700 : 400;
SubstFxFont.m_WeightCJK = SubstFxFont.m_Weight;
SubstFxFont.m_ItalicAngle = dwFontStyle & FX_FONTSTYLE_Italic ? -12 : 0;
@@ -179,7 +179,7 @@ FX_BOOL CFDE_FxgeDevice::DrawString(IFDE_Brush* pBrush,
if (pCurFont != NULL) {
pFxFont = (CFX_Font*)pCurFont->GetDevFont();
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
- FxFont.m_Face = pFxFont->m_Face;
+ FxFont.SetFace(pFxFont->GetFace());
m_pDevice->DrawNormalText(
iCurCount, pCurCP, &FxFont, pCache, -fFontSize,
(const CFX_AffineMatrix*)pMatrix, argb, FXTEXT_CLEARTYPE);
@@ -200,12 +200,12 @@ FX_BOOL CFDE_FxgeDevice::DrawString(IFDE_Brush* pBrush,
if (pCurFont != NULL && iCurCount) {
pFxFont = (CFX_Font*)pCurFont->GetDevFont();
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
- FxFont.m_Face = pFxFont->m_Face;
+ FxFont.SetFace(pFxFont->GetFace());
FX_BOOL bRet = m_pDevice->DrawNormalText(
iCurCount, pCurCP, &FxFont, pCache, -fFontSize,
(const CFX_AffineMatrix*)pMatrix, argb, FXTEXT_CLEARTYPE);
- FxFont.m_pSubstFont = NULL;
- FxFont.m_Face = NULL;
+ FxFont.SetSubstFont(nullptr);
+ FxFont.SetFace(nullptr);
return bRet;
#else
return m_pDevice->DrawNormalText(
@@ -214,8 +214,8 @@ FX_BOOL CFDE_FxgeDevice::DrawString(IFDE_Brush* pBrush,
#endif
}
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
- FxFont.m_pSubstFont = NULL;
- FxFont.m_Face = NULL;
+ FxFont.SetSubstFont(nullptr);
+ FxFont.SetFace(nullptr);
#endif
return TRUE;
} break;