diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-09-26 11:09:35 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-09-26 15:21:44 +0000 |
commit | 1a43b3064dc38a55de4b1d727237806578bb3ef9 (patch) | |
tree | 66c790a154b68fdd6ea63c0bb4cabc0fac0badf4 /xfa/fxfa | |
parent | a7caeb52912150e59aadf49ed21a45a4a1260a4a (diff) | |
download | pdfium-1a43b3064dc38a55de4b1d727237806578bb3ef9.tar.xz |
Remove font default params
This CL removes some default parameters from the font code.
Change-Id: If6f6e09c93474e1e8b7ffaae53eb37dd40c32fab
Reviewed-on: https://pdfium-review.googlesource.com/14815
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa')
-rw-r--r-- | xfa/fxfa/cxfa_fontmgr.cpp | 11 | ||||
-rw-r--r-- | xfa/fxfa/cxfa_fontmgr.h | 3 |
2 files changed, 6 insertions, 8 deletions
diff --git a/xfa/fxfa/cxfa_fontmgr.cpp b/xfa/fxfa/cxfa_fontmgr.cpp index ddf8ffada4..d144bd2cb5 100644 --- a/xfa/fxfa/cxfa_fontmgr.cpp +++ b/xfa/fxfa/cxfa_fontmgr.cpp @@ -26,11 +26,10 @@ CXFA_FontMgr::~CXFA_FontMgr() {} RetainPtr<CFGAS_GEFont> CXFA_FontMgr::GetFont( CXFA_FFDoc* hDoc, const WideStringView& wsFontFamily, - uint32_t dwFontStyles, - uint16_t wCodePage) { + uint32_t dwFontStyles) { uint32_t dwHash = FX_HashCode_GetW(wsFontFamily, false); ByteString bsKey; - bsKey.Format("%u%u%u", dwHash, dwFontStyles, wCodePage); + bsKey.Format("%u%u%u", dwHash, dwFontStyles, 0xFFFF); auto iter = m_FontMap.find(bsKey); if (iter != m_FontMap.end()) return iter->second; @@ -48,7 +47,7 @@ RetainPtr<CFGAS_GEFont> CXFA_FontMgr::GetFont( } if (!pFont && m_pDefFontMgr) pFont = m_pDefFontMgr->GetFont(hDoc->GetApp()->GetFDEFontMgr(), - wsFontFamily, dwFontStyles, wCodePage); + wsFontFamily, dwFontStyles); if (!pFont && pMgr) { pPDFFont = nullptr; @@ -58,8 +57,8 @@ RetainPtr<CFGAS_GEFont> CXFA_FontMgr::GetFont( return pFont; } if (!pFont && m_pDefFontMgr) { - pFont = m_pDefFontMgr->GetDefaultFont( - hDoc->GetApp()->GetFDEFontMgr(), wsFontFamily, dwFontStyles, wCodePage); + pFont = m_pDefFontMgr->GetDefaultFont(hDoc->GetApp()->GetFDEFontMgr(), + wsFontFamily, dwFontStyles); } if (pFont) { diff --git a/xfa/fxfa/cxfa_fontmgr.h b/xfa/fxfa/cxfa_fontmgr.h index 55ee6bbc4d..a940fafc46 100644 --- a/xfa/fxfa/cxfa_fontmgr.h +++ b/xfa/fxfa/cxfa_fontmgr.h @@ -28,8 +28,7 @@ class CXFA_FontMgr { RetainPtr<CFGAS_GEFont> GetFont(CXFA_FFDoc* hDoc, const WideStringView& wsFontFamily, - uint32_t dwFontStyles, - uint16_t wCodePage = 0xFFFF); + uint32_t dwFontStyles); void SetDefFontMgr(std::unique_ptr<CFGAS_DefaultFontManager> pFontMgr); private: |