Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Unified Diff: xfa/fgas/font/fgas_stdfontmgr.cpp

Issue 2162503003: Cleanup fgas/crt. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Win fixes Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fgas/font/fgas_gefont.cpp ('k') | xfa/fgas/layout/fgas_rtfbreak.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fgas/font/fgas_stdfontmgr.cpp
diff --git a/xfa/fgas/font/fgas_stdfontmgr.cpp b/xfa/fgas/font/fgas_stdfontmgr.cpp
index 47ec72b8074e5e94aa1c618b1609f9e7be0b9cc8..8af3f22b9add50a18fe27eaf7b859d2a6f073cfa 100644
--- a/xfa/fgas/font/fgas_stdfontmgr.cpp
+++ b/xfa/fgas/font/fgas_stdfontmgr.cpp
@@ -20,7 +20,7 @@ IFGAS_FontMgr* IFGAS_FontMgr::Create(FX_LPEnumAllFonts pEnumerator) {
CFGAS_StdFontMgrImp::CFGAS_StdFontMgrImp(FX_LPEnumAllFonts pEnumerator)
: m_pEnumerator(pEnumerator),
- m_FontFaces(),
+ m_FontFaces(100),
m_CPFonts(8),
m_FamilyFonts(16),
m_UnicodeFonts(16),
@@ -33,7 +33,7 @@ CFGAS_StdFontMgrImp::CFGAS_StdFontMgrImp(FX_LPEnumAllFonts pEnumerator)
}
CFGAS_StdFontMgrImp::~CFGAS_StdFontMgrImp() {
- m_FontFaces.RemoveAll();
+ m_FontFaces.RemoveAll(FALSE);
m_CPFonts.RemoveAll();
m_FamilyFonts.RemoveAll();
m_UnicodeFonts.RemoveAll();
@@ -298,7 +298,7 @@ FX_FONTDESCRIPTOR const* CFGAS_StdFontMgrImp::FindFont(
return pDesc;
}
if (pszFontFamily && m_pEnumerator) {
- CFX_FontDescriptors namedFonts;
+ CFX_FontDescriptors namedFonts(100);
m_pEnumerator(namedFonts, pszFontFamily, wUnicode);
params.pwsFamily = nullptr;
pDesc = FX_DefFontMatcher(&params, namedFonts);
« no previous file with comments | « xfa/fgas/font/fgas_gefont.cpp ('k') | xfa/fgas/layout/fgas_rtfbreak.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698