From dd0e6e1eba14c76dedd4b4e55ab47406856c9a76 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 28 Sep 2017 11:51:24 -0400 Subject: Cleanup font defines This CL removes duplicate defines between XFA and core. Several OR'd values have been coverted into individual booleans to make the code clearer. Change-Id: Ic32a71c711cffd9a0cf1136e5a22f0502e085c39 Reviewed-on: https://pdfium-review.googlesource.com/15071 Reviewed-by: Ryan Harrison Commit-Queue: dsinclair --- core/fxge/cfx_facecache.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'core/fxge/cfx_facecache.cpp') diff --git a/core/fxge/cfx_facecache.cpp b/core/fxge/cfx_facecache.cpp index 07d7339c2d..a3e58ff29c 100644 --- a/core/fxge/cfx_facecache.cpp +++ b/core/fxge/cfx_facecache.cpp @@ -146,7 +146,7 @@ std::unique_ptr CFX_FaceCache::RenderGlyph( else ft_matrix.xy -= ft_matrix.xx * skew / 100; } - if (pSubstFont->m_SubstFlags & FXFONT_SUBST_MM) { + if (pSubstFont->m_bFlagMM) { pFont->AdjustMMParams(glyph_index, dest_width, pFont->GetSubstFont()->m_Weight); } @@ -172,8 +172,7 @@ std::unique_ptr CFX_FaceCache::RenderGlyph( weight = pSubstFont->m_WeightCJK; else weight = pSubstFont ? pSubstFont->m_Weight : 0; - if (pSubstFont && !(pSubstFont->m_SubstFlags & FXFONT_SUBST_MM) && - weight > 400) { + if (pSubstFont && !pSubstFont->m_bFlagMM && weight > 400) { uint32_t index = (weight - 400) / 10; if (index >= CFX_Font::kWeightPowArraySize) return nullptr; -- cgit v1.2.3