summaryrefslogtreecommitdiff
path: root/xfa/fgas/font
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fgas/font')
-rw-r--r--xfa/fgas/font/cfgas_gefont.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/xfa/fgas/font/cfgas_gefont.cpp b/xfa/fgas/font/cfgas_gefont.cpp
index ab773698e7..b1bd769336 100644
--- a/xfa/fgas/font/cfgas_gefont.cpp
+++ b/xfa/fgas/font/cfgas_gefont.cpp
@@ -160,12 +160,11 @@ bool CFGAS_GEFont::InitFont() {
if (!m_pFont)
return false;
- if (!m_pFontEncoding) {
- m_pFontEncoding.reset(FX_CreateFontEncodingEx(m_pFont));
- if (!m_pFontEncoding)
- return false;
- }
- return true;
+ if (m_pFontEncoding)
+ return true;
+
+ m_pFontEncoding = FX_CreateFontEncodingEx(m_pFont, FXFM_ENCODING_NONE);
+ return !!m_pFontEncoding;
}
CFX_RetainPtr<CFGAS_GEFont> CFGAS_GEFont::Derive(uint32_t dwFontStyles,