From 1a43b3064dc38a55de4b1d727237806578bb3ef9 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 26 Sep 2017 11:09:35 -0400 Subject: 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 Commit-Queue: dsinclair --- xfa/fxfa/cxfa_fontmgr.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'xfa/fxfa/cxfa_fontmgr.cpp') 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 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 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 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) { -- cgit v1.2.3