summaryrefslogtreecommitdiff
path: root/core/fxge/android
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxge/android')
-rw-r--r--core/fxge/android/fpf_skiafont.cpp8
-rw-r--r--core/fxge/android/fpf_skiafont.h12
-rw-r--r--core/fxge/android/fpf_skiafontmgr.cpp38
-rw-r--r--core/fxge/android/fpf_skiafontmgr.h10
-rw-r--r--core/fxge/android/fx_android_font.cpp8
-rw-r--r--core/fxge/android/fx_android_font.h6
6 files changed, 41 insertions, 41 deletions
diff --git a/core/fxge/android/fpf_skiafont.cpp b/core/fxge/android/fpf_skiafont.cpp
index 58b937f3d4..bd9b549e99 100644
--- a/core/fxge/android/fpf_skiafont.cpp
+++ b/core/fxge/android/fpf_skiafont.cpp
@@ -167,9 +167,9 @@ int32_t CFPF_SkiaFont::GetItalicAngle() const {
}
return 0;
}
-FX_DWORD CFPF_SkiaFont::GetFontData(FX_DWORD dwTable,
+uint32_t CFPF_SkiaFont::GetFontData(uint32_t dwTable,
uint8_t* pBuffer,
- FX_DWORD dwSize) {
+ uint32_t dwSize) {
if (!m_Face) {
return 0;
}
@@ -177,12 +177,12 @@ FX_DWORD CFPF_SkiaFont::GetFontData(FX_DWORD dwTable,
if (FXFT_Load_Sfnt_Table(m_Face, dwTable, 0, pBuffer, &ulSize)) {
return 0;
}
- return pdfium::base::checked_cast<FX_DWORD>(ulSize);
+ return pdfium::base::checked_cast<uint32_t>(ulSize);
}
FX_BOOL CFPF_SkiaFont::InitFont(CFPF_SkiaFontMgr* pFontMgr,
CFPF_SkiaFontDescriptor* pFontDes,
const CFX_ByteStringC& bsFamily,
- FX_DWORD dwStyle,
+ uint32_t dwStyle,
uint8_t uCharset) {
if (!pFontMgr || !pFontDes) {
return FALSE;
diff --git a/core/fxge/android/fpf_skiafont.h b/core/fxge/android/fpf_skiafont.h
index d077f38606..9e35c942d3 100644
--- a/core/fxge/android/fpf_skiafont.h
+++ b/core/fxge/android/fpf_skiafont.h
@@ -27,7 +27,7 @@ class CFPF_SkiaFont : public IFPF_Font {
FPF_HFONT GetHandle() override;
CFX_ByteString GetFamilyName() override;
CFX_WideString GetPsName() override;
- FX_DWORD GetFontStyle() const override { return m_dwStyle; }
+ uint32_t GetFontStyle() const override { return m_dwStyle; }
uint8_t GetCharset() const override { return m_uCharset; }
int32_t GetGlyphIndex(FX_WCHAR wUnicode) override;
int32_t GetGlyphWidth(int32_t iGlyphIndex) override;
@@ -37,23 +37,23 @@ class CFPF_SkiaFont : public IFPF_Font {
FX_BOOL GetBBox(FX_RECT& rtBBox) override;
int32_t GetHeight() const override;
int32_t GetItalicAngle() const override;
- FX_DWORD GetFontData(FX_DWORD dwTable,
+ uint32_t GetFontData(uint32_t dwTable,
uint8_t* pBuffer,
- FX_DWORD dwSize) override;
+ uint32_t dwSize) override;
FX_BOOL InitFont(CFPF_SkiaFontMgr* pFontMgr,
CFPF_SkiaFontDescriptor* pFontDes,
const CFX_ByteStringC& bsFamily,
- FX_DWORD dwStyle,
+ uint32_t dwStyle,
uint8_t uCharset);
protected:
CFPF_SkiaFontMgr* m_pFontMgr;
CFPF_SkiaFontDescriptor* m_pFontDes;
FXFT_Face m_Face;
- FX_DWORD m_dwStyle;
+ uint32_t m_dwStyle;
uint8_t m_uCharset;
- FX_DWORD m_dwRefCount;
+ uint32_t m_dwRefCount;
};
#endif
diff --git a/core/fxge/android/fpf_skiafontmgr.cpp b/core/fxge/android/fpf_skiafontmgr.cpp
index 13d030cf26..c9748da859 100644
--- a/core/fxge/android/fpf_skiafontmgr.cpp
+++ b/core/fxge/android/fpf_skiafontmgr.cpp
@@ -42,8 +42,8 @@ static void FPF_SkiaStream_Close(FXFT_Stream stream) {}
};
#endif
struct FPF_SKIAFONTMAP {
- FX_DWORD dwFamily;
- FX_DWORD dwSubSt;
+ uint32_t dwFamily;
+ uint32_t dwSubSt;
};
static const FPF_SKIAFONTMAP g_SkiaFontmap[] = {
{0x58c5083, 0xc8d2e345}, {0x5dfade2, 0xe1633081},
@@ -58,7 +58,7 @@ static const FPF_SKIAFONTMAP g_SkiaFontmap[] = {
{0xcad5eaf6, 0x59b9f8f1}, {0xcb7a04c8, 0xc8d2e345},
{0xfb4ce0de, 0xe1633081},
};
-FX_DWORD FPF_SkiaGetSubstFont(FX_DWORD dwHash) {
+uint32_t FPF_SkiaGetSubstFont(uint32_t dwHash) {
int32_t iStart = 0;
int32_t iEnd = sizeof(g_SkiaFontmap) / sizeof(FPF_SKIAFONTMAP);
while (iStart <= iEnd) {
@@ -79,7 +79,7 @@ static const FPF_SKIAFONTMAP g_SkiaSansFontMap[] = {
{0x779ce19d, 0xd5b8d10f}, {0xcb7a04c8, 0xd5b8d10f},
{0xfb4ce0de, 0xd5b8d10f},
};
-FX_DWORD FPF_SkiaGetSansFont(FX_DWORD dwHash) {
+uint32_t FPF_SkiaGetSansFont(uint32_t dwHash) {
int32_t iStart = 0;
int32_t iEnd = sizeof(g_SkiaSansFontMap) / sizeof(FPF_SKIAFONTMAP);
while (iStart <= iEnd) {
@@ -138,7 +138,7 @@ enum FPF_SKIACHARSET {
FPF_SKIACHARSET_PC = 1 << 17,
FPF_SKIACHARSET_OEM = 1 << 18,
};
-static FX_DWORD FPF_SkiaGetCharset(uint8_t uCharset) {
+static uint32_t FPF_SkiaGetCharset(uint8_t uCharset) {
switch (uCharset) {
case FXFONT_ANSI_CHARSET:
return FPF_SKIACHARSET_Ansi;
@@ -173,8 +173,8 @@ static FX_DWORD FPF_SkiaGetCharset(uint8_t uCharset) {
}
return FPF_SKIACHARSET_Default;
}
-static FX_DWORD FPF_SKIANormalizeFontName(const CFX_ByteStringC& bsfamily) {
- FX_DWORD dwHash = 0;
+static uint32_t FPF_SKIANormalizeFontName(const CFX_ByteStringC& bsfamily) {
+ uint32_t dwHash = 0;
int32_t iLength = bsfamily.GetLength();
const FX_CHAR* pBuffer = bsfamily.GetCStr();
for (int32_t i = 0; i < iLength; i++) {
@@ -186,8 +186,8 @@ static FX_DWORD FPF_SKIANormalizeFontName(const CFX_ByteStringC& bsfamily) {
}
return dwHash;
}
-static FX_DWORD FPF_SKIAGetFamilyHash(const CFX_ByteStringC& bsFamily,
- FX_DWORD dwStyle,
+static uint32_t FPF_SKIAGetFamilyHash(const CFX_ByteStringC& bsFamily,
+ uint32_t dwStyle,
uint8_t uCharset) {
CFX_ByteString bsFont(bsFamily);
if (dwStyle & FXFONT_BOLD) {
@@ -252,16 +252,16 @@ void CFPF_SkiaFontMgr::LoadPrivateFont(const CFX_ByteStringC& bsFileName) {}
void CFPF_SkiaFontMgr::LoadPrivateFont(void* pBuffer, size_t szBuffer) {}
IFPF_Font* CFPF_SkiaFontMgr::CreateFont(const CFX_ByteStringC& bsFamilyname,
uint8_t uCharset,
- FX_DWORD dwStyle,
- FX_DWORD dwMatch) {
- FX_DWORD dwHash = FPF_SKIAGetFamilyHash(bsFamilyname, dwStyle, uCharset);
+ uint32_t dwStyle,
+ uint32_t dwMatch) {
+ uint32_t dwHash = FPF_SKIAGetFamilyHash(bsFamilyname, dwStyle, uCharset);
auto it = m_FamilyFonts.find(dwHash);
if (it != m_FamilyFonts.end() && it->second)
return it->second->Retain();
- FX_DWORD dwFaceName = FPF_SKIANormalizeFontName(bsFamilyname);
- FX_DWORD dwSubst = FPF_SkiaGetSubstFont(dwFaceName);
- FX_DWORD dwSubstSans = FPF_SkiaGetSansFont(dwFaceName);
+ uint32_t dwFaceName = FPF_SKIANormalizeFontName(bsFamilyname);
+ uint32_t dwSubst = FPF_SkiaGetSubstFont(dwFaceName);
+ uint32_t dwSubstSans = FPF_SkiaGetSansFont(dwFaceName);
FX_BOOL bMaybeSymbol = FPF_SkiaMaybeSymbol(bsFamilyname);
if (uCharset != FXFONT_ARABIC_CHARSET && FPF_SkiaMaybeArabic(bsFamilyname)) {
uCharset = FXFONT_ARABIC_CHARSET;
@@ -280,7 +280,7 @@ IFPF_Font* CFPF_SkiaFontMgr::CreateFont(const CFX_ByteStringC& bsFamilyname,
continue;
}
int32_t nFind = 0;
- FX_DWORD dwSysFontName = FPF_SKIANormalizeFontName(pFontDes->m_pFamily);
+ uint32_t dwSysFontName = FPF_SKIANormalizeFontName(pFontDes->m_pFamily);
if (dwFaceName == dwSysFontName) {
nFind += FPF_SKIAMATCHWEIGHT_NAME1;
}
@@ -440,7 +440,7 @@ void CFPF_SkiaFontMgr::ScanFile(const CFX_ByteStringC& file) {
FXFT_Done_Face(face);
}
}
-static const FX_DWORD g_FPFSkiaFontCharsets[] = {
+static const uint32_t g_FPFSkiaFontCharsets[] = {
FPF_SKIACHARSET_Ansi,
FPF_SKIACHARSET_EeasternEuropean,
FPF_SKIACHARSET_Cyrillic,
@@ -474,8 +474,8 @@ static const FX_DWORD g_FPFSkiaFontCharsets[] = {
FPF_SKIACHARSET_OEM,
FPF_SKIACHARSET_Symbol,
};
-static FX_DWORD FPF_SkiaGetFaceCharset(TT_OS2* pOS2) {
- FX_DWORD dwCharset = 0;
+static uint32_t FPF_SkiaGetFaceCharset(TT_OS2* pOS2) {
+ uint32_t dwCharset = 0;
if (pOS2) {
for (int32_t i = 0; i < 32; i++) {
if (pOS2->ulCodePageRange1 & (1 << i)) {
diff --git a/core/fxge/android/fpf_skiafontmgr.h b/core/fxge/android/fpf_skiafontmgr.h
index 5ba5b16475..5ed409cccc 100644
--- a/core/fxge/android/fpf_skiafontmgr.h
+++ b/core/fxge/android/fpf_skiafontmgr.h
@@ -44,9 +44,9 @@ class CFPF_SkiaFontDescriptor {
m_pFamily[iSize] = 0;
}
FX_CHAR* m_pFamily;
- FX_DWORD m_dwStyle;
+ uint32_t m_dwStyle;
int32_t m_iFaceIndex;
- FX_DWORD m_dwCharsets;
+ uint32_t m_dwCharsets;
int32_t m_iGlyphNum;
};
@@ -100,8 +100,8 @@ class CFPF_SkiaFontMgr : public IFPF_FontMgr {
void LoadPrivateFont(void* pBuffer, size_t szBuffer) override;
IFPF_Font* CreateFont(const CFX_ByteStringC& bsFamilyname,
uint8_t uCharset,
- FX_DWORD dwStyle,
- FX_DWORD dwMatch = 0) override;
+ uint32_t dwStyle,
+ uint32_t dwMatch = 0) override;
FX_BOOL InitFTLibrary();
FXFT_Face GetFontFace(IFX_FileRead* pFileRead, int32_t iFaceIndex = 0);
@@ -119,7 +119,7 @@ class CFPF_SkiaFontMgr : public IFPF_FontMgr {
FX_BOOL m_bLoaded;
FXFT_Library m_FTLibrary;
std::vector<CFPF_SkiaFontDescriptor*> m_FontFaces;
- std::map<FX_DWORD, CFPF_SkiaFont*> m_FamilyFonts;
+ std::map<uint32_t, CFPF_SkiaFont*> m_FamilyFonts;
};
#endif
diff --git a/core/fxge/android/fx_android_font.cpp b/core/fxge/android/fx_android_font.cpp
index 7218b5e7d0..d663ac0f4f 100644
--- a/core/fxge/android/fx_android_font.cpp
+++ b/core/fxge/android/fx_android_font.cpp
@@ -32,7 +32,7 @@ void* CFX_AndroidFontInfo::MapFont(int weight,
if (!m_pFontMgr) {
return NULL;
}
- FX_DWORD dwStyle = 0;
+ uint32_t dwStyle = 0;
if (weight >= 700) {
dwStyle |= FXFONT_BOLD;
}
@@ -54,10 +54,10 @@ void* CFX_AndroidFontInfo::MapFont(int weight,
void* CFX_AndroidFontInfo::GetFont(const FX_CHAR* face) {
return NULL;
}
-FX_DWORD CFX_AndroidFontInfo::GetFontData(void* hFont,
- FX_DWORD table,
+uint32_t CFX_AndroidFontInfo::GetFontData(void* hFont,
+ uint32_t table,
uint8_t* buffer,
- FX_DWORD size) {
+ uint32_t size) {
if (!hFont) {
return 0;
}
diff --git a/core/fxge/android/fx_android_font.h b/core/fxge/android/fx_android_font.h
index 1ce4694f77..ee8859185e 100644
--- a/core/fxge/android/fx_android_font.h
+++ b/core/fxge/android/fx_android_font.h
@@ -30,10 +30,10 @@ class CFX_AndroidFontInfo : public IFX_SystemFontInfo {
int& bExact);
virtual void* GetFont(const FX_CHAR* face);
- virtual FX_DWORD GetFontData(void* hFont,
- FX_DWORD table,
+ virtual uint32_t GetFontData(void* hFont,
+ uint32_t table,
uint8_t* buffer,
- FX_DWORD size);
+ uint32_t size);
virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name);
virtual FX_BOOL GetFontCharset(void* hFont, int& charset);