Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2194)

Unified Diff: core/fpdfapi/fpdf_font/cpdf_cidfont.cpp

Issue 2300893003: Try UnicodeFromCharCode even with PDFFONT_SYMBOLIC (Closed)
Patch Set: Change DEPS Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_font/cpdf_cidfont.cpp
diff --git a/core/fpdfapi/fpdf_font/cpdf_cidfont.cpp b/core/fpdfapi/fpdf_font/cpdf_cidfont.cpp
index 2bd886754e63cf92843599748429439060d08a69..df087810f8721362fb8f4430743574c863db5766 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) {
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698