diff options
Diffstat (limited to 'core/fxge')
-rw-r--r-- | core/fxge/cfx_fontmapper.cpp | 39 | ||||
-rw-r--r-- | core/fxge/cfx_fontmapper.h | 7 | ||||
-rw-r--r-- | core/fxge/fx_font.h | 3 |
3 files changed, 1 insertions, 48 deletions
diff --git a/core/fxge/cfx_fontmapper.cpp b/core/fxge/cfx_fontmapper.cpp index f44e7aab69..b9a8eac1a1 100644 --- a/core/fxge/cfx_fontmapper.cpp +++ b/core/fxge/cfx_fontmapper.cpp @@ -611,10 +611,6 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const ByteString& name, void* hFont = m_pFontInfo->MapFont(weight, bItalic, Charset, PitchFamily, family.c_str()); if (!hFont) { -#ifdef PDF_ENABLE_XFA - if (flags & FXFONT_EXACTMATCH) - return nullptr; -#endif // PDF_ENABLE_XFA if (bCJK) { bItalic = italic_angle != 0; weight = old_weight; @@ -697,41 +693,6 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const ByteString& name, return face; } -#ifdef PDF_ENABLE_XFA -FXFT_Face CFX_FontMapper::FindSubstFontByUnicode(uint32_t dwUnicode, - uint32_t flags, - int weight, - int italic_angle) { - if (!m_pFontInfo) - return nullptr; - - bool bItalic = (flags & FXFONT_ITALIC) != 0; - int PitchFamily = 0; - UpdatePitchFamily(flags, &PitchFamily); - void* hFont = - m_pFontInfo->MapFontByUnicode(dwUnicode, weight, bItalic, PitchFamily); - if (!hFont) - return nullptr; - - uint32_t ttc_size = m_pFontInfo->GetFontData(hFont, 0x74746366, nullptr, 0); - uint32_t font_size = m_pFontInfo->GetFontData(hFont, 0, nullptr, 0); - if (font_size == 0 && ttc_size == 0) { - m_pFontInfo->DeleteFont(hFont); - return nullptr; - } - FXFT_Face face = nullptr; - if (ttc_size) { - face = GetCachedTTCFace(hFont, 0x74746366, ttc_size, font_size); - } else { - ByteString SubstName; - m_pFontInfo->GetFaceName(hFont, &SubstName); - face = GetCachedFace(hFont, SubstName, weight, bItalic, font_size); - } - m_pFontInfo->DeleteFont(hFont); - return face; -} -#endif // PDF_ENABLE_XFA - int CFX_FontMapper::GetFaceSize() const { return pdfium::CollectionSize<int>(m_FaceArray); } diff --git a/core/fxge/cfx_fontmapper.h b/core/fxge/cfx_fontmapper.h index 215eec97c2..15bd9f0279 100644 --- a/core/fxge/cfx_fontmapper.h +++ b/core/fxge/cfx_fontmapper.h @@ -34,12 +34,7 @@ class CFX_FontMapper { int italic_angle, int CharsetCP, CFX_SubstFont* pSubstFont); -#ifdef PDF_ENABLE_XFA - FXFT_Face FindSubstFontByUnicode(uint32_t dwUnicode, - uint32_t flags, - int weight, - int italic_angle); -#endif // PDF_ENABLE_XFA + bool IsBuiltinFace(const FXFT_Face face) const; int GetFaceSize() const; ByteString GetFaceName(int index) const { return m_FaceArray[index].name; } diff --git a/core/fxge/fx_font.h b/core/fxge/fx_font.h index cee870f62a..3e0751dbe8 100644 --- a/core/fxge/fx_font.h +++ b/core/fxge/fx_font.h @@ -49,9 +49,6 @@ using CFX_TypeFace = SkTypeface; /* Other font flags */ #define FXFONT_USEEXTERNATTR 0x80000 #define FXFONT_CIDFONT 0x100000 -#ifdef PDF_ENABLE_XFA -#define FXFONT_EXACTMATCH 0x80000000 -#endif // PDF_ENABLE_XFA #define GET_TT_SHORT(w) (uint16_t)(((w)[0] << 8) | (w)[1]) #define GET_TT_LONG(w) \ |