summaryrefslogtreecommitdiff
path: root/core/fxge
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxge')
-rw-r--r--core/fxge/cfx_font.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/fxge/cfx_font.cpp b/core/fxge/cfx_font.cpp
index 08e33d6397..bee1d789ef 100644
--- a/core/fxge/cfx_font.cpp
+++ b/core/fxge/cfx_font.cpp
@@ -317,9 +317,14 @@ void CFX_Font::SetSubstFont(std::unique_ptr<CFX_SubstFont> subst) {
#endif // PDF_ENABLE_XFA
CFX_Font::~CFX_Font() {
- if (m_Face)
+ if (m_Face) {
+#ifndef PDF_ENABLE_XFA
+ if (FXFT_Get_Face_External_Stream(m_Face)) {
+ FXFT_Clear_Face_External_Stream(m_Face);
+ }
+#endif // PDF_ENABLE_XFA
DeleteFace();
-
+ }
#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
ReleasePlatformResource();
#endif