summaryrefslogtreecommitdiff
path: root/core/src/fpdftext/fpdf_text.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fpdftext/fpdf_text.cpp')
-rw-r--r--core/src/fpdftext/fpdf_text.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/src/fpdftext/fpdf_text.cpp b/core/src/fpdftext/fpdf_text.cpp
index defad925b9..f633e19517 100644
--- a/core/src/fpdftext/fpdf_text.cpp
+++ b/core/src/fpdftext/fpdf_text.cpp
@@ -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;