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

Unified Diff: core/src/fpdftext/fpdf_text.cpp

Issue 484503002: Fix hebrew character highlight issue in a special document (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 6 years, 4 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 | « no previous file | core/src/fpdftext/fpdf_text_int.cpp » ('j') | core/src/fpdftext/fpdf_text_int.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdftext/fpdf_text.cpp
diff --git a/core/src/fpdftext/fpdf_text.cpp b/core/src/fpdftext/fpdf_text.cpp
index defad925b96b3fb8916c8ffb646de648566e589d..f633e1951703be4aad9282f2cf8dbf86f0df6e9e 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;
jbreiden 2014/08/18 19:10:49 The example PDF file for this bug contains a mappi
+ }
+ else {
+ text += unicode_str;
+ }
}
pBaseLine->InsertTextBox(leftx, rightx, topy, bottomy, spacew, fontsize_v, text);
return pBaseLine;
« no previous file with comments | « no previous file | core/src/fpdftext/fpdf_text_int.cpp » ('j') | core/src/fpdftext/fpdf_text_int.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698