summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font/cpdf_font.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/font/cpdf_font.h')
-rw-r--r--core/fpdfapi/font/cpdf_font.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fpdfapi/font/cpdf_font.h b/core/fpdfapi/font/cpdf_font.h
index 4b099ae0d0..9580d1c36b 100644
--- a/core/fpdfapi/font/cpdf_font.h
+++ b/core/fpdfapi/font/cpdf_font.h
@@ -66,8 +66,8 @@ class CPDF_Font {
ByteString GetBaseFont() const { return m_BaseFont; }
CFX_SubstFont* GetSubstFont() const { return m_Font.GetSubstFont(); }
bool IsEmbedded() const { return IsType3Font() || m_pFontFile != nullptr; }
- const CPDF_Dictionary* GetFontDict() const { return m_pFontDict; }
- CPDF_Dictionary* GetFontDict() { return m_pFontDict; }
+ CPDF_Dictionary* GetFontDict() const { return m_pFontDict.Get(); }
+ void ClearFontDict() { m_pFontDict = nullptr; }
bool IsStandardFont() const;
FXFT_Face GetFace() const { return m_Font.GetFace(); }
void AppendChar(ByteString* str, uint32_t charcode) const;
@@ -113,7 +113,7 @@ class CPDF_Font {
std::vector<std::unique_ptr<CFX_Font>> m_FontFallbacks;
ByteString m_BaseFont;
RetainPtr<CPDF_StreamAcc> m_pFontFile;
- CPDF_Dictionary* m_pFontDict;
+ UnownedPtr<CPDF_Dictionary> m_pFontDict;
mutable std::unique_ptr<CPDF_ToUnicodeMap> m_pToUnicodeMap;
mutable bool m_bToUnicodeLoaded;
int m_Flags;