diff options
author | tsepez <tsepez@chromium.org> | 2016-06-03 14:04:19 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-03 14:04:19 -0700 |
commit | b71dc76df4a1eb04f89a64cd542a1d585df3251e (patch) | |
tree | 12c37f62e8bcf2c8803c111ec692d4c08329fa41 /xfa/fxfa/app | |
parent | b5032dd963b6a25145c285b36a12c98593744d2f (diff) | |
download | pdfium-b71dc76df4a1eb04f89a64cd542a1d585df3251e.tar.xz |
Rename IFX_Font to IFGAS_Font
Avoid confusion with CFX_Font, which is defined in fxcrt,
and does not inherit from nor bear any resemblence to IFX_Font.
Review-Url: https://codereview.chromium.org/2036173003
Diffstat (limited to 'xfa/fxfa/app')
-rw-r--r-- | xfa/fxfa/app/xfa_ffwidgetacc.cpp | 2 | ||||
-rw-r--r-- | xfa/fxfa/app/xfa_fontmgr.cpp | 54 | ||||
-rw-r--r-- | xfa/fxfa/app/xfa_fwltheme.cpp | 4 | ||||
-rw-r--r-- | xfa/fxfa/app/xfa_fwltheme.h | 2 | ||||
-rw-r--r-- | xfa/fxfa/app/xfa_textlayout.cpp | 4 | ||||
-rw-r--r-- | xfa/fxfa/app/xfa_textlayout.h | 6 |
6 files changed, 36 insertions, 36 deletions
diff --git a/xfa/fxfa/app/xfa_ffwidgetacc.cpp b/xfa/fxfa/app/xfa_ffwidgetacc.cpp index e3429c553f..c440848941 100644 --- a/xfa/fxfa/app/xfa_ffwidgetacc.cpp +++ b/xfa/fxfa/app/xfa_ffwidgetacc.cpp @@ -1517,7 +1517,7 @@ CXFA_WidgetLayoutData* CXFA_WidgetAcc::GetWidgetLayoutData() { return m_pLayoutData.get(); } -IFX_Font* CXFA_WidgetAcc::GetFDEFont() { +IFGAS_Font* CXFA_WidgetAcc::GetFDEFont() { CFX_WideStringC wsFontName = FX_WSTRC(L"Courier"); uint32_t dwFontStyle = 0; if (CXFA_Font font = GetFont()) { diff --git a/xfa/fxfa/app/xfa_fontmgr.cpp b/xfa/fxfa/app/xfa_fontmgr.cpp index ae1449876f..fcf27a1846 100644 --- a/xfa/fxfa/app/xfa_fontmgr.cpp +++ b/xfa/fxfa/app/xfa_fontmgr.cpp @@ -1742,13 +1742,13 @@ CXFA_DefFontMgr::~CXFA_DefFontMgr() { m_CacheFonts[i]->Release(); } -IFX_Font* CXFA_DefFontMgr::GetFont(CXFA_FFDoc* hDoc, - const CFX_WideStringC& wsFontFamily, - uint32_t dwFontStyles, - uint16_t wCodePage) { +IFGAS_Font* CXFA_DefFontMgr::GetFont(CXFA_FFDoc* hDoc, + const CFX_WideStringC& wsFontFamily, + uint32_t dwFontStyles, + uint16_t wCodePage) { CFX_WideString wsFontName(wsFontFamily); IFX_FontMgr* pFDEFontMgr = hDoc->GetApp()->GetFDEFontMgr(); - IFX_Font* pFont = + IFGAS_Font* pFont = pFDEFontMgr->LoadFont(wsFontName.c_str(), dwFontStyles, wCodePage); if (!pFont) { const XFA_FONTINFO* pCurFont = @@ -1787,12 +1787,12 @@ IFX_Font* CXFA_DefFontMgr::GetFont(CXFA_FFDoc* hDoc, return pFont; } -IFX_Font* CXFA_DefFontMgr::GetDefaultFont(CXFA_FFDoc* hDoc, - const CFX_WideStringC& wsFontFamily, - uint32_t dwFontStyles, - uint16_t wCodePage) { +IFGAS_Font* CXFA_DefFontMgr::GetDefaultFont(CXFA_FFDoc* hDoc, + const CFX_WideStringC& wsFontFamily, + uint32_t dwFontStyles, + uint16_t wCodePage) { IFX_FontMgr* pFDEFontMgr = hDoc->GetApp()->GetFDEFontMgr(); - IFX_Font* pFont = + IFGAS_Font* pFont = pFDEFontMgr->LoadFont(L"Arial Narrow", dwFontStyles, wCodePage); if (!pFont) pFont = @@ -1824,11 +1824,11 @@ CXFA_PDFFontMgr::~CXFA_PDFFontMgr() { pair.second->Release(); } } -IFX_Font* CXFA_PDFFontMgr::FindFont(CFX_ByteString strPsName, - FX_BOOL bBold, - FX_BOOL bItalic, - CPDF_Font** pDstPDFFont, - FX_BOOL bStrictMatch) { +IFGAS_Font* CXFA_PDFFontMgr::FindFont(CFX_ByteString strPsName, + FX_BOOL bBold, + FX_BOOL bItalic, + CPDF_Font** pDstPDFFont, + FX_BOOL bStrictMatch) { CPDF_Document* pDoc = m_pDoc->GetPDFDoc(); if (pDoc == NULL) { return NULL; @@ -1867,15 +1867,15 @@ IFX_Font* CXFA_PDFFontMgr::FindFont(CFX_ByteString strPsName, *pDstPDFFont = pPDFFont; return NULL; } - return IFX_Font::LoadFont(&pPDFFont->m_Font, pFDEFontMgr); + return IFGAS_Font::LoadFont(&pPDFFont->m_Font, pFDEFontMgr); } return NULL; } -IFX_Font* CXFA_PDFFontMgr::GetFont(const CFX_WideStringC& wsFontFamily, - uint32_t dwFontStyles, - CPDF_Font** pPDFFont, - FX_BOOL bStrictMatch) { +IFGAS_Font* CXFA_PDFFontMgr::GetFont(const CFX_WideStringC& wsFontFamily, + uint32_t dwFontStyles, + CPDF_Font** pPDFFont, + FX_BOOL bStrictMatch) { uint32_t dwHashCode = FX_HashCode_GetW(wsFontFamily, false); CFX_ByteString strKey; strKey.Format("%u%u", dwHashCode, dwFontStyles); @@ -1887,7 +1887,7 @@ IFX_Font* CXFA_PDFFontMgr::GetFont(const CFX_WideStringC& wsFontFamily, FX_BOOL bBold = (dwFontStyles & FX_FONTSTYLE_Bold) == FX_FONTSTYLE_Bold; FX_BOOL bItalic = (dwFontStyles & FX_FONTSTYLE_Italic) == FX_FONTSTYLE_Italic; CFX_ByteString strFontName = PsNameToFontName(bsPsName, bBold, bItalic); - IFX_Font* pFont = + IFGAS_Font* pFont = FindFont(strFontName, bBold, bItalic, pPDFFont, bStrictMatch); if (pFont) m_FontMap[strKey] = pFont; @@ -1982,7 +1982,7 @@ FX_BOOL CXFA_PDFFontMgr::PsNameMatchDRFontName( } return TRUE; } -FX_BOOL CXFA_PDFFontMgr::GetCharWidth(IFX_Font* pFont, +FX_BOOL CXFA_PDFFontMgr::GetCharWidth(IFGAS_Font* pFont, FX_WCHAR wUnicode, int32_t& iWidth, FX_BOOL bCharCode) { @@ -2002,10 +2002,10 @@ CXFA_FontMgr::CXFA_FontMgr() {} CXFA_FontMgr::~CXFA_FontMgr() {} -IFX_Font* CXFA_FontMgr::GetFont(CXFA_FFDoc* hDoc, - const CFX_WideStringC& wsFontFamily, - uint32_t dwFontStyles, - uint16_t wCodePage) { +IFGAS_Font* CXFA_FontMgr::GetFont(CXFA_FFDoc* hDoc, + const CFX_WideStringC& wsFontFamily, + uint32_t dwFontStyles, + uint16_t wCodePage) { uint32_t dwHash = FX_HashCode_GetW(wsFontFamily, false); CFX_ByteString bsKey; bsKey.Format("%u%u%u", dwHash, dwFontStyles, wCodePage); @@ -2018,7 +2018,7 @@ IFX_Font* CXFA_FontMgr::GetFont(CXFA_FFDoc* hDoc, CXFA_PDFFontMgr* pMgr = it != m_PDFFontMgrMap.end() ? it->second.get() : nullptr; CPDF_Font* pPDFFont = nullptr; - IFX_Font* pFont = nullptr; + IFGAS_Font* pFont = nullptr; if (pMgr) { pFont = pMgr->GetFont(wsEnglishName.AsStringC(), dwFontStyles, &pPDFFont); if (pFont) diff --git a/xfa/fxfa/app/xfa_fwltheme.cpp b/xfa/fxfa/app/xfa_fwltheme.cpp index 14649f1b80..0c8e346066 100644 --- a/xfa/fxfa/app/xfa_fwltheme.cpp +++ b/xfa/fxfa/app/xfa_fwltheme.cpp @@ -78,8 +78,8 @@ FWL_Error CXFA_FWLTheme::Initialize() { m_pTextOut.reset(new CFDE_TextOut); for (size_t i = 0; !m_pCalendarFont && i < FX_ArraySize(g_FWLTheme_CalFonts); ++i) { - m_pCalendarFont = IFX_Font::LoadFont(g_FWLTheme_CalFonts[i], 0, 0, - m_pApp->GetFDEFontMgr()); + m_pCalendarFont = IFGAS_Font::LoadFont(g_FWLTheme_CalFonts[i], 0, 0, + m_pApp->GetFDEFontMgr()); } if (!m_pCalendarFont) { #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ diff --git a/xfa/fxfa/app/xfa_fwltheme.h b/xfa/fxfa/app/xfa_fwltheme.h index 1f75e90437..b73239c003 100644 --- a/xfa/fxfa/app/xfa_fwltheme.h +++ b/xfa/fxfa/app/xfa_fwltheme.h @@ -81,7 +81,7 @@ class CXFA_FWLTheme final : public IFWL_ThemeProvider { std::unique_ptr<CFDE_TextOut> m_pTextOut; FX_FLOAT m_fCapacity; uint32_t m_dwCapacity; - IFX_Font* m_pCalendarFont; + IFGAS_Font* m_pCalendarFont; CFX_WideString m_wsResource; CXFA_FFApp* m_pApp; CFX_RectF m_Rect; diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp index fa300f1721..1966cca67d 100644 --- a/xfa/fxfa/app/xfa_textlayout.cpp +++ b/xfa/fxfa/app/xfa_textlayout.cpp @@ -332,8 +332,8 @@ FX_BOOL CXFA_TextParser::IsSpaceRun(IFDE_CSSComputedStyle* pStyle) const { } return FALSE; } -IFX_Font* CXFA_TextParser::GetFont(CXFA_TextProvider* pTextProvider, - IFDE_CSSComputedStyle* pStyle) const { +IFGAS_Font* CXFA_TextParser::GetFont(CXFA_TextProvider* pTextProvider, + IFDE_CSSComputedStyle* pStyle) const { CFX_WideStringC wsFamily = FX_WSTRC(L"Courier"); uint32_t dwStyle = 0; CXFA_Font font = pTextProvider->GetFontNode(); diff --git a/xfa/fxfa/app/xfa_textlayout.h b/xfa/fxfa/app/xfa_textlayout.h index 30399a6217..a4bd9cede7 100644 --- a/xfa/fxfa/app/xfa_textlayout.h +++ b/xfa/fxfa/app/xfa_textlayout.h @@ -95,8 +95,8 @@ class CXFA_TextParser { FX_BOOL IsSpaceRun(IFDE_CSSComputedStyle* pStyle) const; FX_BOOL GetTabstops(IFDE_CSSComputedStyle* pStyle, CXFA_TextTabstopsContext* pTabstopContext); - IFX_Font* GetFont(CXFA_TextProvider* pTextProvider, - IFDE_CSSComputedStyle* pStyle) const; + IFGAS_Font* GetFont(CXFA_TextProvider* pTextProvider, + IFDE_CSSComputedStyle* pStyle) const; FX_FLOAT GetFontSize(CXFA_TextProvider* pTextProvider, IFDE_CSSComputedStyle* pStyle) const; int32_t GetHorScale(CXFA_TextProvider* pTextProvider, @@ -259,7 +259,7 @@ class XFA_TextPiece : public CFX_Target { int32_t iUnderline; int32_t iPeriod; int32_t iLineThrough; - IFX_Font* pFont; + IFGAS_Font* pFont; FX_ARGB dwColor; FX_FLOAT fFontSize; CFX_RectF rtPiece; |