diff options
author | Lei Zhang <thestig@chromium.org> | 2018-05-22 16:50:49 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-22 16:50:49 +0000 |
commit | a2edb51dcd4551a021438cbb8b6e1b5172b3ca18 (patch) | |
tree | 62250c24980071a08321ff9f76d324a2f218ffd0 | |
parent | 71501b5226ca7cbedbc5f972dd3d54d3d5de4d98 (diff) | |
download | pdfium-a2edb51dcd4551a021438cbb8b6e1b5172b3ca18.tar.xz |
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>
-rw-r--r-- | core/fxge/cfx_fontmapper.cpp | 2 | ||||
-rw-r--r-- | testing/resources/pixel/bug_820345_expected.pdf.0.png | bin | 758 -> 1649 bytes | |||
-rw-r--r-- | testing/resources/pixel/bug_820345_expected_win.pdf.0.png | bin | 0 -> 1649 bytes |
3 files changed, 2 insertions, 0 deletions
diff --git a/core/fxge/cfx_fontmapper.cpp b/core/fxge/cfx_fontmapper.cpp index 87442b54e6..f44e7aab69 100644 --- a/core/fxge/cfx_fontmapper.cpp +++ b/core/fxge/cfx_fontmapper.cpp @@ -587,6 +587,8 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const ByteString& name, } } 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 Binary files differindex c29515a937..e3c8e24d66 100644 --- a/testing/resources/pixel/bug_820345_expected.pdf.0.png +++ b/testing/resources/pixel/bug_820345_expected.pdf.0.png diff --git a/testing/resources/pixel/bug_820345_expected_win.pdf.0.png b/testing/resources/pixel/bug_820345_expected_win.pdf.0.png Binary files differnew file mode 100644 index 0000000000..78ebe89941 --- /dev/null +++ b/testing/resources/pixel/bug_820345_expected_win.pdf.0.png |