summaryrefslogtreecommitdiff
path: root/core/fxge/cfx_facecache.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-09-28 11:51:24 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-28 20:39:56 +0000
commitdd0e6e1eba14c76dedd4b4e55ab47406856c9a76 (patch)
tree36f27e3ec86b5c376d51bcd753cbdfbe3402e6c7 /core/fxge/cfx_facecache.cpp
parent58418a24debb15019ec71eca193eff02c2a4846c (diff)
downloadpdfium-dd0e6e1eba14c76dedd4b4e55ab47406856c9a76.tar.xz
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 <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxge/cfx_facecache.cpp')
-rw-r--r--core/fxge/cfx_facecache.cpp5
1 files changed, 2 insertions, 3 deletions
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_GlyphBitmap> 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_GlyphBitmap> 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;