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

Unified Diff: experimental/PdfViewer/SkPdfFont.cpp

Issue 20538002: pdfviewer: limit the characters we support in ToUnicode, to 0xffff (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 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 | experimental/PdfViewer/pdf_viewer_main.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/PdfViewer/SkPdfFont.cpp
===================================================================
--- experimental/PdfViewer/SkPdfFont.cpp (revision 10357)
+++ experimental/PdfViewer/SkPdfFont.cpp (working copy)
@@ -311,7 +311,8 @@
for (unsigned int i = 0 ; i < str->len(); i++) {
ret = (ret << 8) + ((unsigned char*)str->c_str())[i];
}
- return ret;
+ // TODO(edisonn): character larger than 0x0000ffff not supported right now.
+ return ret & 0x0000ffff;
}
#define tokenIsKeyword(token,keyword) (token.fType == kKeyword_TokenType && token.fKeywordLength==sizeof(keyword)-1 && strncmp(token.fKeyword, keyword, sizeof(keyword)-1) == 0)
« no previous file with comments | « no previous file | experimental/PdfViewer/pdf_viewer_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698