From a2edb51dcd4551a021438cbb8b6e1b5172b3ca18 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 22 May 2018 16:50:49 +0000 Subject: 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 Reviewed-by: dsinclair --- core/fxge/cfx_fontmapper.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core') 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) { -- cgit v1.2.3