summaryrefslogtreecommitdiff
path: root/xfa/fgas/font
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-10-02 22:50:59 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-02 22:50:59 +0000
commitddb1b871c86deb05dc7746c68b9fdbae5f7602cc (patch)
treed9e53455e2121b2c67cc727817f8ef87be4fda9a /xfa/fgas/font
parent0c56d6362b95fe0181be2c2ac66db1c3ab73552b (diff)
downloadpdfium-ddb1b871c86deb05dc7746c68b9fdbae5f7602cc.tar.xz
Avoid overloading CFGAS_FontMgr::LoadFont().
Rename the internal one LoadFontInternal. Remove unused out parameter. Change-Id: Ia108bc4fc29ef0ad7732eacad9bb924a8e424c2e Reviewed-on: https://pdfium-review.googlesource.com/c/43317 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fgas/font')
-rw-r--r--xfa/fgas/font/cfgas_fontmgr.cpp12
-rw-r--r--xfa/fgas/font/cfgas_fontmgr.h5
2 files changed, 7 insertions, 10 deletions
diff --git a/xfa/fgas/font/cfgas_fontmgr.cpp b/xfa/fgas/font/cfgas_fontmgr.cpp
index 6a1e20dc03..b2150f99b8 100644
--- a/xfa/fgas/font/cfgas_fontmgr.cpp
+++ b/xfa/fgas/font/cfgas_fontmgr.cpp
@@ -702,9 +702,9 @@ bool CFGAS_FontMgr::EnumFonts() {
return EnumFontsFromFontMapper() || EnumFontsFromFiles();
}
-RetainPtr<CFGAS_GEFont> CFGAS_FontMgr::LoadFont(const WideString& wsFaceName,
- int32_t iFaceIndex,
- int32_t* pFaceCount) {
+RetainPtr<CFGAS_GEFont> CFGAS_FontMgr::LoadFontInternal(
+ const WideString& wsFaceName,
+ int32_t iFaceIndex) {
CFX_FontMgr* pFontMgr = CFX_GEModule::Get()->GetFontMgr();
CFX_FontMapper* pFontMapper = pFontMgr->GetBuiltinMapper();
if (!pFontMapper)
@@ -729,8 +729,6 @@ RetainPtr<CFGAS_GEFont> CFGAS_FontMgr::LoadFont(const WideString& wsFaceName,
return nullptr;
m_IFXFont2FileRead[pFont] = pFontStream;
- if (pFaceCount)
- *pFaceCount = pFont->GetDevFont()->GetFace()->num_faces;
return pFont;
}
@@ -866,7 +864,7 @@ RetainPtr<CFGAS_GEFont> CFGAS_FontMgr::GetFontByCodePage(
CFX_FontDescriptor* pDesc = (*sortedFontInfos)[0].pFont;
RetainPtr<CFGAS_GEFont> pFont =
- LoadFont(pDesc->m_wsFaceName, pDesc->m_nFaceIndex, nullptr);
+ LoadFontInternal(pDesc->m_wsFaceName, pDesc->m_nFaceIndex);
#endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
if (!pFont)
@@ -938,7 +936,7 @@ RetainPtr<CFGAS_GEFont> CFGAS_FontMgr::GetFontByUnicode(
if (!VerifyUnicodeForFontDescriptor(pDesc, wUnicode))
continue;
RetainPtr<CFGAS_GEFont> pFont =
- LoadFont(pDesc->m_wsFaceName, pDesc->m_nFaceIndex, nullptr);
+ LoadFontInternal(pDesc->m_wsFaceName, pDesc->m_nFaceIndex);
if (!pFont)
continue;
pFont->SetLogicalFontStyle(dwFontStyles);
diff --git a/xfa/fgas/font/cfgas_fontmgr.h b/xfa/fgas/font/cfgas_fontmgr.h
index 01b96a3595..bc2a7af2a7 100644
--- a/xfa/fgas/font/cfgas_fontmgr.h
+++ b/xfa/fgas/font/cfgas_fontmgr.h
@@ -161,9 +161,8 @@ class CFGAS_FontMgr final : public Observable<CFGAS_FontMgr> {
uint32_t dwFontStyles,
const WideString& FontName,
wchar_t wcUnicode);
- RetainPtr<CFGAS_GEFont> LoadFont(const WideString& wsFaceName,
- int32_t iFaceIndex,
- int32_t* pFaceCount);
+ RetainPtr<CFGAS_GEFont> LoadFontInternal(const WideString& wsFaceName,
+ int32_t iFaceIndex);
#endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
std::map<uint32_t, std::vector<RetainPtr<CFGAS_GEFont>>> m_Hash2Fonts;