summaryrefslogtreecommitdiff
path: root/core/fxge
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-05-22 16:50:49 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-22 16:50:49 +0000
commita2edb51dcd4551a021438cbb8b6e1b5172b3ca18 (patch)
tree62250c24980071a08321ff9f76d324a2f218ffd0 /core/fxge
parent71501b5226ca7cbedbc5f972dd3d54d3d5de4d98 (diff)
downloadpdfium-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>
Diffstat (limited to 'core/fxge')
-rw-r--r--core/fxge/cfx_fontmapper.cpp2
1 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) {