diff options
Diffstat (limited to 'core/fpdfapi/fpdf_font')
-rw-r--r-- | core/fpdfapi/fpdf_font/cpdf_cidfont.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/fpdfapi/fpdf_font/cpdf_cidfont.cpp b/core/fpdfapi/fpdf_font/cpdf_cidfont.cpp index 2bd886754e..df087810f8 100644 --- a/core/fpdfapi/fpdf_font/cpdf_cidfont.cpp +++ b/core/fpdfapi/fpdf_font/cpdf_cidfont.cpp @@ -631,8 +631,11 @@ int CPDF_CIDFont::GlyphFromCharCode(uint32_t charcode, bool* pVertGlyph) { unicode = m_pCID2UnicodeMap->UnicodeFromCID(cid); if (unicode == 0) unicode = GetUnicodeFromCharCode(charcode); - if (unicode == 0 && !(m_Flags & PDFFONT_SYMBOLIC)) - unicode = UnicodeFromCharCode(charcode).GetAt(0); + if (unicode == 0) { + CFX_WideString unicode_str = UnicodeFromCharCode(charcode); + if (!unicode_str.IsEmpty()) + unicode = unicode_str.GetAt(0); + } } FXFT_Face face = m_Font.GetFace(); if (unicode == 0) { |