diff options
author | thestig <thestig@chromium.org> | 2015-12-08 15:29:09 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-08 23:30:37 +0000 |
commit | 144cda5f04c9b22db41f8f85255acd44fdb65c52 (patch) | |
tree | 5c3abe4b85be41168ac7465f73280b97313ac5c0 /pdf/pdfium | |
parent | bf4852c7b302dcb67a9d0a9a8c31168dcb6fd00a (diff) | |
download | chromium_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.cc | 6 |
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; |