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

Unified Diff: pdf/pdfium/pdfium_engine.cc

Issue 1507263002: PDF: Always use Courier New for fixed ANSI fonts on Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/pdfium/pdfium_engine.cc
diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc
index 20e84d9211b24c10fca038d77a0652d6603b03e8..5287a2961b8a927f486b3b399113baecee35820d 100644
--- a/pdf/pdfium/pdfium_engine.cc
+++ b/pdf/pdfium/pdfium_engine.cc
@@ -206,7 +206,11 @@ void* MapFont(struct _FPDF_SYSFONTINFO*, int weight, int italic,
// MS Mincho in Shift_JIS encoding.
{"\x82\x6C\x82\x72\x96\xBE\x92\xA9",
"MS Mincho", false, false},
-};
+ };
+
+ // Similar logic exists in PDFium's CFX_FolderFontInfo::FindFont().
+ if (charset == FXFONT_ANSI_CHARSET && (pitch_family & FXFONT_FF_FIXEDPITCH))
+ face = "Courier New";
// Map from the standard PDF fonts to TrueType font names.
size_t i;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698