diff options
Diffstat (limited to 'core/src/fxge/android')
-rw-r--r-- | core/src/fxge/android/fpf_skiafont.cpp | 4 | ||||
-rw-r--r-- | core/src/fxge/android/fpf_skiafont.h | 2 | ||||
-rw-r--r-- | core/src/fxge/android/fpf_skiafontmgr.cpp | 10 | ||||
-rw-r--r-- | core/src/fxge/android/fpf_skiafontmgr.h | 14 | ||||
-rw-r--r-- | core/src/fxge/android/fx_android_font.cpp | 6 | ||||
-rw-r--r-- | core/src/fxge/android/fx_android_font.h | 6 |
6 files changed, 21 insertions, 21 deletions
diff --git a/core/src/fxge/android/fpf_skiafont.cpp b/core/src/fxge/android/fpf_skiafont.cpp index 290d989851..213a6595aa 100644 --- a/core/src/fxge/android/fpf_skiafont.cpp +++ b/core/src/fxge/android/fpf_skiafont.cpp @@ -156,7 +156,7 @@ int32_t CFPF_SkiaFont::GetItalicAngle() const } return 0; } -FX_DWORD CFPF_SkiaFont::GetFontData(FX_DWORD dwTable, FX_LPBYTE pBuffer, FX_DWORD dwSize) +FX_DWORD CFPF_SkiaFont::GetFontData(FX_DWORD dwTable, uint8_t* pBuffer, FX_DWORD dwSize) { if (!m_Face) { return FALSE; @@ -184,7 +184,7 @@ FX_BOOL CFPF_SkiaFont::InitFont(CFPF_SkiaFontMgr *pFontMgr, CFPF_SkiaFontDescrip break; case FPF_SKIAFONTTYPE_Buffer: { CFPF_SkiaBufferFont *pFont = (CFPF_SkiaBufferFont*)pFontDes; - m_Face = pFontMgr->GetFontFace((FX_LPCBYTE)pFont->m_pBuffer, pFont->m_szBuffer, pFont->m_iFaceIndex); + m_Face = pFontMgr->GetFontFace((const uint8_t*)pFont->m_pBuffer, pFont->m_szBuffer, pFont->m_iFaceIndex); } break; default: diff --git a/core/src/fxge/android/fpf_skiafont.h b/core/src/fxge/android/fpf_skiafont.h index 72b569fe2e..af33402846 100644 --- a/core/src/fxge/android/fpf_skiafont.h +++ b/core/src/fxge/android/fpf_skiafont.h @@ -44,7 +44,7 @@ public: virtual int32_t GetHeight() const; virtual int32_t GetItalicAngle() const; - virtual FX_DWORD GetFontData(FX_DWORD dwTable, FX_LPBYTE pBuffer, FX_DWORD dwSize); + virtual FX_DWORD GetFontData(FX_DWORD dwTable, uint8_t* pBuffer, FX_DWORD dwSize); FX_BOOL InitFont(CFPF_SkiaFontMgr *pFontMgr, CFPF_SkiaFontDescriptor *pFontDes, FX_BSTR bsFamily, FX_DWORD dwStyle, uint8_t uCharset); protected: CFPF_SkiaFontMgr *m_pFontMgr; diff --git a/core/src/fxge/android/fpf_skiafontmgr.cpp b/core/src/fxge/android/fpf_skiafontmgr.cpp index 6b27f073e5..df9ce8983a 100644 --- a/core/src/fxge/android/fpf_skiafontmgr.cpp +++ b/core/src/fxge/android/fpf_skiafontmgr.cpp @@ -103,7 +103,7 @@ FX_DWORD FPF_SkiaGetSansFont(FX_DWORD dwHash) } return 0; } -static uint32_t FPF_GetHashCode_StringA(FX_LPCSTR pStr, int32_t iLength, FX_BOOL bIgnoreCase = FALSE) +static uint32_t FPF_GetHashCode_StringA(const FX_CHAR* pStr, int32_t iLength, FX_BOOL bIgnoreCase = FALSE) { if (!pStr) { return 0; @@ -111,7 +111,7 @@ static uint32_t FPF_GetHashCode_StringA(FX_LPCSTR pStr, int32_t iLength, FX_BOOL if (iLength < 0) { iLength = FXSYS_strlen(pStr); } - FX_LPCSTR pStrEnd = pStr + iLength; + const FX_CHAR* pStrEnd = pStr + iLength; uint32_t uHashCode = 0; if (bIgnoreCase) { while (pStr < pStrEnd) { @@ -185,7 +185,7 @@ static FX_DWORD FPF_SKIANormalizeFontName(FX_BSTR bsfamily) { FX_DWORD dwHash = 0; int32_t iLength = bsfamily.GetLength(); - FX_LPCSTR pBuffer = bsfamily.GetCStr(); + const FX_CHAR* pBuffer = bsfamily.GetCStr(); for (int32_t i = 0; i < iLength; i++) { FX_CHAR ch = pBuffer[i]; if (ch == ' ' || ch == '-' || ch == ',') { @@ -276,7 +276,7 @@ void CFPF_SkiaFontMgr::LoadPrivateFont(IFX_FileRead* pFontFile) void CFPF_SkiaFontMgr::LoadPrivateFont(FX_BSTR bsFileName) { } -void CFPF_SkiaFontMgr::LoadPrivateFont(FX_LPVOID pBuffer, size_t szBuffer) +void CFPF_SkiaFontMgr::LoadPrivateFont(void* pBuffer, size_t szBuffer) { } IFPF_Font* CFPF_SkiaFontMgr::CreateFont(FX_BSTR bsFamilyname, uint8_t uCharset, FX_DWORD dwStyle, FX_DWORD dwMatch) @@ -417,7 +417,7 @@ FXFT_Face CFPF_SkiaFontMgr::GetFontFace(FX_BSTR bsFile, int32_t iFaceIndex ) FXFT_Set_Pixel_Sizes(face, 0, 64); return face; } -FXFT_Face CFPF_SkiaFontMgr::GetFontFace(FX_LPCBYTE pBuffer, size_t szBuffer, int32_t iFaceIndex ) +FXFT_Face CFPF_SkiaFontMgr::GetFontFace(const uint8_t* pBuffer, size_t szBuffer, int32_t iFaceIndex ) { if (!pBuffer || szBuffer < 1) { return NULL; diff --git a/core/src/fxge/android/fpf_skiafontmgr.h b/core/src/fxge/android/fpf_skiafontmgr.h index 44d427f8af..ba9ea9134a 100644 --- a/core/src/fxge/android/fpf_skiafontmgr.h +++ b/core/src/fxge/android/fpf_skiafontmgr.h @@ -26,7 +26,7 @@ public: { return FPF_SKIAFONTTYPE_Unknown; } - void SetFamily(FX_LPCSTR pFamily) + void SetFamily(const FX_CHAR* pFamily) { if (m_pFamily) { FX_Free(m_pFamily); @@ -36,7 +36,7 @@ public: FXSYS_memcpy32(m_pFamily, pFamily, iSize * sizeof(FX_CHAR)); m_pFamily[iSize] = 0; } - FX_LPSTR m_pFamily; + FX_CHAR* m_pFamily; FX_DWORD m_dwStyle; int32_t m_iFaceIndex; FX_DWORD m_dwCharsets; @@ -56,7 +56,7 @@ public: { return FPF_SKIAFONTTYPE_Path; } - void SetPath(FX_LPCSTR pPath) + void SetPath(const FX_CHAR* pPath) { if (m_pPath) { FX_Free(m_pPath); @@ -66,7 +66,7 @@ public: FXSYS_memcpy32(m_pPath, pPath, iSize * sizeof(FX_CHAR)); m_pPath[iSize] = 0; } - FX_LPSTR m_pPath; + FX_CHAR* m_pPath; }; class CFPF_SkiaFileFont : public CFPF_SkiaFontDescriptor { @@ -86,7 +86,7 @@ public: { return FPF_SKIAFONTTYPE_Buffer; } - FX_LPVOID m_pBuffer; + void* m_pBuffer; size_t m_szBuffer; }; class CFPF_SkiaFontMgr : public IFPF_FontMgr @@ -98,12 +98,12 @@ public: virtual void LoadSystemFonts(); virtual void LoadPrivateFont(IFX_FileRead* pFontFile); virtual void LoadPrivateFont(FX_BSTR bsFileName); - virtual void LoadPrivateFont(FX_LPVOID pBuffer, size_t szBuffer); + virtual void LoadPrivateFont(void* pBuffer, size_t szBuffer); virtual IFPF_Font* CreateFont(FX_BSTR bsFamilyname, uint8_t uCharset, FX_DWORD dwStyle, FX_DWORD dwMatch = 0); FXFT_Face GetFontFace(IFX_FileRead *pFileRead, int32_t iFaceIndex = 0); FXFT_Face GetFontFace(FX_BSTR bsFile, int32_t iFaceIndex = 0); - FXFT_Face GetFontFace(FX_LPCBYTE pBuffer, size_t szBuffer, int32_t iFaceIndex = 0); + FXFT_Face GetFontFace(const uint8_t* pBuffer, size_t szBuffer, int32_t iFaceIndex = 0); protected: void ScanPath(FX_BSTR path); void ScanFile(FX_BSTR file); diff --git a/core/src/fxge/android/fx_android_font.cpp b/core/src/fxge/android/fx_android_font.cpp index 5f8aafc393..48331c2dd0 100644 --- a/core/src/fxge/android/fx_android_font.cpp +++ b/core/src/fxge/android/fx_android_font.cpp @@ -23,7 +23,7 @@ FX_BOOL CFX_AndroidFontInfo::EnumFontList(CFX_FontMapper* pMapper) { return FALSE; } -void* CFX_AndroidFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR face, FX_BOOL& bExact) +void* CFX_AndroidFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* face, FX_BOOL& bExact) { if (!m_pFontMgr) { return NULL; @@ -46,11 +46,11 @@ void* CFX_AndroidFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int } return m_pFontMgr->CreateFont(face, charset, dwStyle, FPF_MATCHFONT_REPLACEANSI); } -void* CFX_AndroidFontInfo::GetFont(FX_LPCSTR face) +void* CFX_AndroidFontInfo::GetFont(const FX_CHAR* face) { return NULL; } -FX_DWORD CFX_AndroidFontInfo::GetFontData(void* hFont, FX_DWORD table, FX_LPBYTE buffer, FX_DWORD size) +FX_DWORD CFX_AndroidFontInfo::GetFontData(void* hFont, FX_DWORD table, uint8_t* buffer, FX_DWORD size) { if (!hFont) { return 0; diff --git a/core/src/fxge/android/fx_android_font.h b/core/src/fxge/android/fx_android_font.h index fb7ff7cd92..0e79abaa9f 100644 --- a/core/src/fxge/android/fx_android_font.h +++ b/core/src/fxge/android/fx_android_font.h @@ -20,10 +20,10 @@ public: virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper); - virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR face, FX_BOOL& bExact); + virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* face, FX_BOOL& bExact); - virtual void* GetFont(FX_LPCSTR face); - virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, FX_LPBYTE buffer, FX_DWORD size); + virtual void* GetFont(const FX_CHAR* face); + virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, uint8_t* buffer, FX_DWORD size); virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name); virtual FX_BOOL GetFontCharset(void* hFont, int& charset); |