diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-06-10 11:09:44 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-06-10 11:09:44 -0700 |
commit | fbf266fc0ea4be2523cbb901a641aa33f0035662 (patch) | |
tree | d0e5eda4d3c220818903eca76bc2ca835a1851d0 /core/src/fxge/ge/fx_ge_font.cpp | |
parent | 3c949d5d2b0d680839766ea99c86b263230b263d (diff) | |
download | pdfium-fbf266fc0ea4be2523cbb901a641aa33f0035662.tar.xz |
Remove typdefs for pointer types in fx_system.h.
This involves fixing some multiple variable per line
declarations, as the textually-substituted "*" applies
only to the first one.
This involves moving some consts around following the
substitution.
This involves replacing some typedefs used as constructors
with better code.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1171733003
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; |