summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/fxge/android/cfpf_skiafontmgr.cpp16
-rw-r--r--core/fxge/android/cfpf_skiafontmgr.h5
-rw-r--r--core/fxge/android/cfx_androidfontinfo.cpp3
3 files changed, 9 insertions, 15 deletions
diff --git a/core/fxge/android/cfpf_skiafontmgr.cpp b/core/fxge/android/cfpf_skiafontmgr.cpp
index 37cd4516b7..cd6aab1f2d 100644
--- a/core/fxge/android/cfpf_skiafontmgr.cpp
+++ b/core/fxge/android/cfpf_skiafontmgr.cpp
@@ -6,11 +6,6 @@
#include "core/fxge/android/cfpf_skiafontmgr.h"
-#define FPF_SKIAMATCHWEIGHT_NAME1 62
-#define FPF_SKIAMATCHWEIGHT_NAME2 60
-#define FPF_SKIAMATCHWEIGHT_1 16
-#define FPF_SKIAMATCHWEIGHT_2 8
-
#include <algorithm>
#include "core/fxcrt/fx_codepage.h"
@@ -25,6 +20,11 @@
namespace {
+constexpr int FPF_SKIAMATCHWEIGHT_NAME1 = 62;
+constexpr int FPF_SKIAMATCHWEIGHT_NAME2 = 60;
+constexpr int FPF_SKIAMATCHWEIGHT_1 = 16;
+constexpr int FPF_SKIAMATCHWEIGHT_2 = 8;
+
struct FPF_SKIAFONTMAP {
uint32_t dwFamily;
uint32_t dwSubSt;
@@ -252,8 +252,7 @@ void CFPF_SkiaFontMgr::LoadSystemFonts() {
CFPF_SkiaFont* CFPF_SkiaFontMgr::CreateFont(const ByteStringView& bsFamilyname,
uint8_t uCharset,
- uint32_t dwStyle,
- uint32_t dwMatch) {
+ uint32_t dwStyle) {
uint32_t dwHash = FPF_SKIAGetFamilyHash(bsFamilyname, dwStyle, uCharset);
auto it = m_FamilyFonts.find(dwHash);
if (it != m_FamilyFonts.end())
@@ -268,8 +267,7 @@ CFPF_SkiaFont* CFPF_SkiaFontMgr::CreateFont(const ByteStringView& bsFamilyname,
if (uCharset != FX_CHARSET_MSWin_Arabic &&
FPF_SkiaMaybeArabic(bsFamilyname)) {
uCharset = FX_CHARSET_MSWin_Arabic;
- } else if (uCharset == FX_CHARSET_ANSI &&
- (dwMatch & FPF_MATCHFONT_REPLACEANSI)) {
+ } else if (uCharset == FX_CHARSET_ANSI) {
uCharset = FX_CHARSET_Default;
}
int32_t nExpectVal = FPF_SKIAMATCHWEIGHT_NAME1 + FPF_SKIAMATCHWEIGHT_1 * 3 +
diff --git a/core/fxge/android/cfpf_skiafontmgr.h b/core/fxge/android/cfpf_skiafontmgr.h
index 99aafd7bd2..2c7d8679c5 100644
--- a/core/fxge/android/cfpf_skiafontmgr.h
+++ b/core/fxge/android/cfpf_skiafontmgr.h
@@ -14,8 +14,6 @@
#include "core/fxcrt/fx_string.h"
#include "core/fxge/fx_font.h"
-#define FPF_MATCHFONT_REPLACEANSI 1
-
class CFPF_SkiaFont;
class CFPF_SkiaPathFont;
@@ -27,8 +25,7 @@ class CFPF_SkiaFontMgr {
void LoadSystemFonts();
CFPF_SkiaFont* CreateFont(const ByteStringView& bsFamilyname,
uint8_t uCharset,
- uint32_t dwStyle,
- uint32_t dwMatch);
+ uint32_t dwStyle);
bool InitFTLibrary();
FXFT_Face GetFontFace(const ByteStringView& bsFile, int32_t iFaceIndex);
diff --git a/core/fxge/android/cfx_androidfontinfo.cpp b/core/fxge/android/cfx_androidfontinfo.cpp
index 61d213edd6..20776414ab 100644
--- a/core/fxge/android/cfx_androidfontinfo.cpp
+++ b/core/fxge/android/cfx_androidfontinfo.cpp
@@ -45,8 +45,7 @@ void* CFX_AndroidFontInfo::MapFont(int weight,
dwStyle |= FXFONT_SCRIPT;
if (FontFamilyIsRoman(pitch_family))
dwStyle |= FXFONT_SERIF;
- return m_pFontMgr->CreateFont(face, charset, dwStyle,
- FPF_MATCHFONT_REPLACEANSI);
+ return m_pFontMgr->CreateFont(face, charset, dwStyle);
}
void* CFX_AndroidFontInfo::GetFont(const char* face) {