summaryrefslogtreecommitdiffstats
path: root/pdf/pdfium
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2015-12-08 15:29:09 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-08 23:30:37 +0000
commit144cda5f04c9b22db41f8f85255acd44fdb65c52 (patch)
tree5c3abe4b85be41168ac7465f73280b97313ac5c0 /pdf/pdfium
parentbf4852c7b302dcb67a9d0a9a8c31168dcb6fd00a (diff)
downloadchromium_src-144cda5f04c9b22db41f8f85255acd44fdb65c52.zip
chromium_src-144cda5f04c9b22db41f8f85255acd44fdb65c52.tar.gz
chromium_src-144cda5f04c9b22db41f8f85255acd44fdb65c52.tar.bz2
PDF: Always use Courier New for fixed ANSI fonts on Linux.
BUG=564349 Review URL: https://codereview.chromium.org/1507263002 Cr-Commit-Position: refs/heads/master@{#363831}
Diffstat (limited to 'pdf/pdfium')
-rw-r--r--pdf/pdfium/pdfium_engine.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc
index 20e84d9..5287a29 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;