From 38c8660228ccedcae079c277eaf0f4bbb5eae65b Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Fri, 13 Jan 2017 14:40:27 -0500 Subject: Add default substitution for narrow fonts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BUG=669893 Change-Id: I0977c031d5b272ce5182da6b3020ac092e30aef4 Reviewed-on: https://pdfium-review.googlesource.com/2210 Reviewed-by: dsinclair Commit-Queue: dsinclair Commit-Queue: Nicolás Peña --- core/fxge/ge/cfx_fontmapper.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/fxge/ge/cfx_fontmapper.cpp b/core/fxge/ge/cfx_fontmapper.cpp index 1b79520373..02143ecc59 100644 --- a/core/fxge/ge/cfx_fontmapper.cpp +++ b/core/fxge/ge/cfx_fontmapper.cpp @@ -582,6 +582,15 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const CFX_ByteString& name, bItalic = italic_angle != 0; weight = old_weight; } + if (family.Find("Narrow") > 0 || family.Find("Condensed") > 0) { +#if _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_ + family = "LiberationSansNarrow"; +#elif _FXM_PLATFORM_ == _FXM_PLATFORM_ANDROID_ + family = "RobotoCondensed"; +#else + family = "ArialNarrow"; +#endif + } } else { pSubstFont->m_bSubstCJK = true; if (nStyle) -- cgit v1.2.3