commit | a2edb51dcd4551a021438cbb8b6e1b5172b3ca18 | [log] [tgz] |
---|---|---|
author | Lei Zhang <thestig@chromium.org> | Tue May 22 16:50:49 2018 +0000 |
committer | Chromium commit bot <commit-bot@chromium.org> | Tue May 22 16:50:49 2018 +0000 |
tree | 62250c24980071a08321ff9f76d324a2f218ffd0 | |
parent | 71501b5226ca7cbedbc5f972dd3d54d3d5de4d98 [diff] |
Fix a regression with missing text. Commit 10e1f05a incorrectly removed a font weight sanitizing step in the font substitution code. BUG=chromium:820345 Change-Id: I876f65a5649270648616f561eaad17ee333b9a9e Reviewed-on: https://pdfium-review.googlesource.com/32832 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
diff --git a/core/fxge/cfx_fontmapper.cpp b/core/fxge/cfx_fontmapper.cpp index 87442b5..f44e7aa 100644 --- a/core/fxge/cfx_fontmapper.cpp +++ b/core/fxge/cfx_fontmapper.cpp
@@ -587,6 +587,8 @@ } } else { italic_angle = 0; + if (nStyle == FXFONT_NORMAL) + weight = FXFONT_FW_NORMAL; } if (!match.IsEmpty() || iBaseFont < kNumStandardFonts) {
diff --git a/testing/resources/pixel/bug_820345_expected.pdf.0.png b/testing/resources/pixel/bug_820345_expected.pdf.0.png index c29515a..e3c8e24 100644 --- a/testing/resources/pixel/bug_820345_expected.pdf.0.png +++ b/testing/resources/pixel/bug_820345_expected.pdf.0.png Binary files differ
diff --git a/testing/resources/pixel/bug_820345_expected_win.pdf.0.png b/testing/resources/pixel/bug_820345_expected_win.pdf.0.png new file mode 100644 index 0000000..78ebe89 --- /dev/null +++ b/testing/resources/pixel/bug_820345_expected_win.pdf.0.png Binary files differ