diff options
Diffstat (limited to 'core/src/fxge/ge/fx_ge_font.cpp')
-rw-r--r-- | core/src/fxge/ge/fx_ge_font.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/src/fxge/ge/fx_ge_font.cpp b/core/src/fxge/ge/fx_ge_font.cpp index 8928d25d4c..21c1081480 100644 --- a/core/src/fxge/ge/fx_ge_font.cpp +++ b/core/src/fxge/ge/fx_ge_font.cpp @@ -8,7 +8,7 @@ #include "../../../include/fxge/fx_freetype.h" #include "text_int.h" #define EM_ADJUST(em, a) (em == 0?(a): (a)*1000/em) -extern void _FPDFAPI_GetInternalFontData(int id1, FX_LPCBYTE& data, FX_DWORD& size); +extern void _FPDFAPI_GetInternalFontData(int id1, const uint8_t*& data, FX_DWORD& size); CFX_Font::CFX_Font() { m_pSubstFont = NULL; @@ -153,7 +153,7 @@ int CFX_Font::GetGlyphWidth(FX_DWORD glyph_index) int width = EM_ADJUST(FXFT_Get_Face_UnitsPerEM(m_Face), FXFT_Get_Glyph_HoriAdvance(m_Face)); return width; } -static FXFT_Face FT_LoadFont(FX_LPBYTE pData, int size) +static FXFT_Face FT_LoadFont(uint8_t* pData, int size) { FXFT_Library library; if (CFX_GEModule::Get()->GetFontMgr()->m_FTLibrary == NULL) { @@ -171,12 +171,12 @@ static FXFT_Face FT_LoadFont(FX_LPBYTE pData, int size) } return face; } -FX_BOOL CFX_Font::LoadEmbedded(FX_LPCBYTE data, FX_DWORD size) +FX_BOOL CFX_Font::LoadEmbedded(const uint8_t* data, FX_DWORD size) { m_pFontDataAllocation = FX_Alloc(uint8_t, size); FXSYS_memcpy32(m_pFontDataAllocation, data, size); - m_Face = FT_LoadFont((FX_LPBYTE)m_pFontDataAllocation, size); - m_pFontData = (FX_LPBYTE)m_pFontDataAllocation; + m_Face = FT_LoadFont((uint8_t*)m_pFontDataAllocation, size); + m_pFontData = (uint8_t*)m_pFontDataAllocation; m_bEmbedded = TRUE; m_dwSize = size; return m_Face != NULL; |