From 10e1f05a9e644cd954792bcd40ef787551cbd209 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 28 Sep 2017 15:59:42 -0400 Subject: Cleanup font defines Use methods to match font information; cleanup some font code. Change-Id: Ib99c1e466e56723cb5d264d49e1caf9bbbc0daed Reviewed-on: https://pdfium-review.googlesource.com/15072 Reviewed-by: Ryan Harrison Commit-Queue: dsinclair --- core/fxge/apple/fx_mac_imp.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/fxge/apple/fx_mac_imp.cpp') diff --git a/core/fxge/apple/fx_mac_imp.cpp b/core/fxge/apple/fx_mac_imp.cpp index 637984797a..324f0200b9 100644 --- a/core/fxge/apple/fx_mac_imp.cpp +++ b/core/fxge/apple/fx_mac_imp.cpp @@ -56,8 +56,8 @@ void GetJapanesePreference(ByteString* face, int weight, int pitch_family) { *face = JAPAN_GOTHIC; return; } - *face = ((pitch_family & FXFONT_FF_ROMAN) || weight <= 400) ? JAPAN_MINCHO - : JAPAN_GOTHIC; + *face = (FontFamilyIsRoman(pitch_family) || weight <= 400) ? JAPAN_MINCHO + : JAPAN_GOTHIC; } void* CFX_MacFontInfo::MapFont(int weight, @@ -97,7 +97,7 @@ void* CFX_MacFontInfo::MapFont(int weight, if (it != m_FontList.end()) return it->second.get(); - if (charset == FX_CHARSET_ANSI && (pitch_family & FXFONT_FF_FIXEDPITCH)) + if (charset == FX_CHARSET_ANSI && FontFamilyIsFixedPitch(pitch_family)) return GetFont("Courier New"); if (charset == FX_CHARSET_ANSI || charset == FX_CHARSET_Symbol) -- cgit v1.2.3