summaryrefslogtreecommitdiff
path: root/core/fxge/android
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxge/android')
-rw-r--r--core/fxge/android/cfpf_skiafontmgr.cpp18
-rw-r--r--core/fxge/android/cfx_androidfontinfo.cpp6
2 files changed, 12 insertions, 12 deletions
diff --git a/core/fxge/android/cfpf_skiafontmgr.cpp b/core/fxge/android/cfpf_skiafontmgr.cpp
index 214e718e0b..d8b751d9b2 100644
--- a/core/fxge/android/cfpf_skiafontmgr.cpp
+++ b/core/fxge/android/cfpf_skiafontmgr.cpp
@@ -176,11 +176,11 @@ uint32_t FPF_SKIAGetFamilyHash(const ByteStringView& bsFamily,
uint32_t dwStyle,
uint8_t uCharset) {
ByteString bsFont(bsFamily);
- if (dwStyle & FXFONT_BOLD)
+ if (FontStyleIsBold(dwStyle))
bsFont += "Bold";
- if (dwStyle & FXFONT_ITALIC)
+ if (FontStyleIsItalic(dwStyle))
bsFont += "Italic";
- if (dwStyle & FXFONT_SERIF)
+ if (FontStyleIsSerif(dwStyle))
bsFont += "Serif";
bsFont += uCharset;
return FPF_GetHashCode_StringA(bsFont.c_str(), bsFont.GetLength());
@@ -317,17 +317,17 @@ CFPF_SkiaFont* CFPF_SkiaFontMgr::CreateFont(const ByteStringView& bsFamilyname,
if (dwFaceName == dwSysFontName)
nFind += FPF_SKIAMATCHWEIGHT_NAME1;
bool bMatchedName = (nFind == FPF_SKIAMATCHWEIGHT_NAME1);
- if ((dwStyle & FXFONT_BOLD) == (pFontDes->m_dwStyle & FXFONT_BOLD))
+ if (FontStyleIsBold(dwStyle) == FontStyleIsBold(pFontDes->m_dwStyle))
nFind += FPF_SKIAMATCHWEIGHT_1;
- if ((dwStyle & FXFONT_ITALIC) == (pFontDes->m_dwStyle & FXFONT_ITALIC))
+ if (FontStyleIsItalic(dwStyle) == FontStyleIsItalic(pFontDes->m_dwStyle))
nFind += FPF_SKIAMATCHWEIGHT_1;
- if ((dwStyle & FXFONT_FIXED_PITCH) ==
- (pFontDes->m_dwStyle & FXFONT_FIXED_PITCH)) {
+ if (FontStyleIsFixedPitch(dwStyle) ==
+ FontStyleIsFixedPitch(pFontDes->m_dwStyle)) {
nFind += FPF_SKIAMATCHWEIGHT_2;
}
- if ((dwStyle & FXFONT_SERIF) == (pFontDes->m_dwStyle & FXFONT_SERIF))
+ if (FontStyleIsSerif(dwStyle) == FontStyleIsSerif(pFontDes->m_dwStyle))
nFind += FPF_SKIAMATCHWEIGHT_1;
- if ((dwStyle & FXFONT_SCRIPT) == (pFontDes->m_dwStyle & FXFONT_SCRIPT))
+ if (FontStyleIsScript(dwStyle) == FontStyleIsScript(pFontDes->m_dwStyle))
nFind += FPF_SKIAMATCHWEIGHT_2;
if (dwSubst == dwSysFontName || dwSubstSans == dwSysFontName) {
nFind += FPF_SKIAMATCHWEIGHT_NAME2;
diff --git a/core/fxge/android/cfx_androidfontinfo.cpp b/core/fxge/android/cfx_androidfontinfo.cpp
index c6c3e61866..15ac8c29b2 100644
--- a/core/fxge/android/cfx_androidfontinfo.cpp
+++ b/core/fxge/android/cfx_androidfontinfo.cpp
@@ -40,11 +40,11 @@ void* CFX_AndroidFontInfo::MapFont(int weight,
dwStyle |= FXFONT_BOLD;
if (bItalic)
dwStyle |= FXFONT_ITALIC;
- if (pitch_family & FXFONT_FF_FIXEDPITCH)
+ if (FontFamilyIsFixedPitch(pitch_family))
dwStyle |= FXFONT_FIXED_PITCH;
- if (pitch_family & FXFONT_FF_SCRIPT)
+ if (FontFamilyIsScript(pitch_family))
dwStyle |= FXFONT_SCRIPT;
- if (pitch_family & FXFONT_FF_ROMAN)
+ if (FontFamilyIsRoman(pitch_family))
dwStyle |= FXFONT_SERIF;
return m_pFontMgr->CreateFont(face, charset, dwStyle,
FPF_MATCHFONT_REPLACEANSI);