Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / pdfium / core / src / fpdftext / fpdf_text.cpp
index defad92..f633e19 100644 (file)
@@ -184,7 +184,12 @@ CTextBaseLine* CTextPage::InsertTextBox(CTextBaseLine* pBaseLine, FX_FLOAT basey
     while (offset < len) {
         FX_DWORD ch = pFont->GetNextChar(pStr, offset);
         CFX_WideString unicode_str = pFont->UnicodeFromCharCode(ch);
-        text += unicode_str;
+        if (unicode_str.IsEmpty()) {
+            text += (FX_WCHAR)ch;
+        }
+        else {
+            text += unicode_str;
+        }
     }
     pBaseLine->InsertTextBox(leftx, rightx, topy, bottomy, spacew, fontsize_v, text);
     return pBaseLine;