summaryrefslogtreecommitdiff
path: root/core/include/fxge/fx_font.h
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-03-25 15:18:35 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-25 15:18:36 -0700
commitb5e8f14e3eefc5da995b332788d3203cee204883 (patch)
tree34fc80504d2034013b18f30df1b0f6f1a94e2d70 /core/include/fxge/fx_font.h
parent6d18bd3b8ec82ae3c24a439f5c7925786a0e2d8b (diff)
downloadpdfium-chromium/2693.tar.xz
Remove FX_DWORD from core/ and delete definitionchromium/2695chromium/2694chromium/2693chromium/2692
Review URL: https://codereview.chromium.org/1832173003
Diffstat (limited to 'core/include/fxge/fx_font.h')
-rw-r--r--core/include/fxge/fx_font.h94
1 files changed, 47 insertions, 47 deletions
diff --git a/core/include/fxge/fx_font.h b/core/include/fxge/fx_font.h
index 382a916734..c52e614e97 100644
--- a/core/include/fxge/fx_font.h
+++ b/core/include/fxge/fx_font.h
@@ -66,12 +66,12 @@ class CFX_Font {
void LoadSubst(const CFX_ByteString& face_name,
FX_BOOL bTrueType,
- FX_DWORD flags,
+ uint32_t flags,
int weight,
int italic_angle,
int CharsetCP,
FX_BOOL bVertical = FALSE);
- FX_BOOL LoadEmbedded(const uint8_t* data, FX_DWORD size);
+ FX_BOOL LoadEmbedded(const uint8_t* data, uint32_t size);
FXFT_Face GetFace() const { return m_Face; }
#ifdef PDF_ENABLE_XFA
@@ -87,11 +87,11 @@ class CFX_Font {
const CFX_SubstFont* GetSubstFont() const { return m_pSubstFont; }
#endif // PDF_ENABLE_XFA
- CFX_PathData* LoadGlyphPath(FX_DWORD glyph_index, int dest_width = 0);
- int GetGlyphWidth(FX_DWORD glyph_index);
+ CFX_PathData* LoadGlyphPath(uint32_t glyph_index, int dest_width = 0);
+ int GetGlyphWidth(uint32_t glyph_index);
int GetAscent() const;
int GetDescent() const;
- FX_BOOL GetGlyphBBox(FX_DWORD glyph_index, FX_RECT& bbox);
+ FX_BOOL GetGlyphBBox(uint32_t glyph_index, FX_RECT& bbox);
FX_BOOL IsItalic() const;
FX_BOOL IsBold() const;
FX_BOOL IsFixedWidth() const;
@@ -111,7 +111,7 @@ class CFX_Font {
void* GetPlatformFont() const { return m_pPlatformFont; }
void SetPlatformFont(void* font) { m_pPlatformFont = font; }
uint8_t* GetFontData() const { return m_pFontData; }
- FX_DWORD GetSize() const { return m_dwSize; }
+ uint32_t GetSize() const { return m_dwSize; }
void AdjustMMParams(int glyph_index, int width, int weight);
private:
@@ -123,7 +123,7 @@ class CFX_Font {
uint8_t* m_pFontDataAllocation;
uint8_t* m_pFontData;
uint8_t* m_pGsubData;
- FX_DWORD m_dwSize;
+ uint32_t m_dwSize;
CFX_BinaryBuf m_OtfFontData;
void* m_hHandle;
void* m_pPlatformFont;
@@ -147,8 +147,8 @@ class CFX_Font {
#ifdef PDF_ENABLE_XFA
#define FXFM_ENC_TAG(a, b, c, d) \
- (((FX_DWORD)(a) << 24) | ((FX_DWORD)(b) << 16) | ((FX_DWORD)(c) << 8) | \
- (FX_DWORD)(d))
+ (((uint32_t)(a) << 24) | ((uint32_t)(b) << 16) | ((uint32_t)(c) << 8) | \
+ (uint32_t)(d))
#define FXFM_ENCODING_NONE FXFM_ENC_TAG(0, 0, 0, 0)
#define FXFM_ENCODING_MS_SYMBOL FXFM_ENC_TAG('s', 'y', 'm', 'b')
#define FXFM_ENCODING_UNICODE FXFM_ENC_TAG('u', 'n', 'i', 'c')
@@ -170,7 +170,7 @@ class CFX_UnicodeEncoding {
explicit CFX_UnicodeEncoding(CFX_Font* pFont);
virtual ~CFX_UnicodeEncoding();
- virtual FX_DWORD GlyphFromCharCode(FX_DWORD charcode);
+ virtual uint32_t GlyphFromCharCode(uint32_t charcode);
protected:
// Unowned, not nullptr.
@@ -180,20 +180,20 @@ class CFX_UnicodeEncoding {
#ifdef PDF_ENABLE_XFA
class CFX_UnicodeEncodingEx : public CFX_UnicodeEncoding {
public:
- CFX_UnicodeEncodingEx(CFX_Font* pFont, FX_DWORD EncodingID);
+ CFX_UnicodeEncodingEx(CFX_Font* pFont, uint32_t EncodingID);
~CFX_UnicodeEncodingEx() override;
// CFX_UnicodeEncoding:
- FX_DWORD GlyphFromCharCode(FX_DWORD charcode) override;
+ uint32_t GlyphFromCharCode(uint32_t charcode) override;
- FX_DWORD CharCodeFromUnicode(FX_WCHAR Unicode) const;
+ uint32_t CharCodeFromUnicode(FX_WCHAR Unicode) const;
private:
- FX_DWORD m_nEncodingID;
+ uint32_t m_nEncodingID;
};
CFX_UnicodeEncodingEx* FX_CreateFontEncodingEx(
CFX_Font* pFont,
- FX_DWORD nEncodingID = FXFM_ENCODING_NONE);
+ uint32_t nEncodingID = FXFM_ENCODING_NONE);
#endif // PDF_ENABLE_XFA
#define FXFONT_SUBST_MM 0x01
@@ -214,7 +214,7 @@ class CFX_SubstFont {
int m_Charset;
- FX_DWORD m_SubstFlags;
+ uint32_t m_SubstFlags;
int m_Weight;
@@ -249,29 +249,29 @@ class CFX_FontMgr {
int weight,
FX_BOOL bItalic,
uint8_t* pData,
- FX_DWORD size,
+ uint32_t size,
int face_index);
FXFT_Face GetCachedTTCFace(int ttc_size,
- FX_DWORD checksum,
+ uint32_t checksum,
int font_offset,
uint8_t*& pFontData);
FXFT_Face AddCachedTTCFace(int ttc_size,
- FX_DWORD checksum,
+ uint32_t checksum,
uint8_t* pData,
- FX_DWORD size,
+ uint32_t size,
int font_offset);
FXFT_Face GetFileFace(const FX_CHAR* filename, int face_index);
- FXFT_Face GetFixedFace(const uint8_t* pData, FX_DWORD size, int face_index);
+ FXFT_Face GetFixedFace(const uint8_t* pData, uint32_t size, int face_index);
void ReleaseFace(FXFT_Face face);
void SetSystemFontInfo(IFX_SystemFontInfo* pFontInfo);
FXFT_Face FindSubstFont(const CFX_ByteString& face_name,
FX_BOOL bTrueType,
- FX_DWORD flags,
+ uint32_t flags,
int weight,
int italic_angle,
int CharsetCP,
CFX_SubstFont* pSubstFont);
- bool GetBuiltinFont(size_t index, const uint8_t** pFontData, FX_DWORD* size);
+ bool GetBuiltinFont(size_t index, const uint8_t** pFontData, uint32_t* size);
CFX_FontMapper* GetBuiltinMapper() const { return m_pBuiltinMapper.get(); }
FXFT_Library GetFTLibrary() const { return m_FTLibrary; }
@@ -316,14 +316,14 @@ class CFX_FontMapper {
IFX_FontEnumerator* GetFontEnumerator() const { return m_pFontEnumerator; }
FXFT_Face FindSubstFont(const CFX_ByteString& face_name,
FX_BOOL bTrueType,
- FX_DWORD flags,
+ uint32_t flags,
int weight,
int italic_angle,
int CharsetCP,
CFX_SubstFont* pSubstFont);
#ifdef PDF_ENABLE_XFA
- FXFT_Face FindSubstFontByUnicode(FX_DWORD dwUnicode,
- FX_DWORD flags,
+ FXFT_Face FindSubstFontByUnicode(uint32_t dwUnicode,
+ uint32_t flags,
int weight,
int italic_angle);
#endif // PDF_ENABLE_XFA
@@ -346,7 +346,7 @@ class CFX_FontMapper {
FX_BOOL m_bListLoaded;
FXFT_Face m_MMFaces[MM_FACE_COUNT];
CFX_ByteString m_LastFamily;
- CFX_ArrayTemplate<FX_DWORD> m_CharsetArray;
+ CFX_ArrayTemplate<uint32_t> m_CharsetArray;
std::vector<CFX_ByteString> m_FaceArray;
IFX_SystemFontInfo* m_pFontInfo;
FXFT_Face m_FoxitFaces[FOXIT_FACE_COUNT];
@@ -368,17 +368,17 @@ class IFX_SystemFontInfo {
int& iExact) = 0;
#ifdef PDF_ENABLE_XFA
- virtual void* MapFontByUnicode(FX_DWORD dwUnicode,
+ virtual void* MapFontByUnicode(uint32_t dwUnicode,
int weight,
FX_BOOL bItalic,
int pitch_family);
#endif // PDF_ENABLE_XFA
virtual void* GetFont(const FX_CHAR* face) = 0;
- virtual FX_DWORD GetFontData(void* hFont,
- FX_DWORD table,
+ virtual uint32_t GetFontData(void* hFont,
+ uint32_t table,
uint8_t* buffer,
- FX_DWORD size) = 0;
+ uint32_t size) = 0;
virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) = 0;
virtual FX_BOOL GetFontCharset(void* hFont, int& charset) = 0;
virtual int GetFaceIndex(void* hFont);
@@ -405,16 +405,16 @@ class CFX_FolderFontInfo : public IFX_SystemFontInfo {
const FX_CHAR* face,
int& bExact) override;
#ifdef PDF_ENABLE_XFA
- void* MapFontByUnicode(FX_DWORD dwUnicode,
+ void* MapFontByUnicode(uint32_t dwUnicode,
int weight,
FX_BOOL bItalic,
int pitch_family) override;
#endif // PDF_ENABLE_XFA
void* GetFont(const FX_CHAR* face) override;
- FX_DWORD GetFontData(void* hFont,
- FX_DWORD table,
+ uint32_t GetFontData(void* hFont,
+ uint32_t table,
uint8_t* buffer,
- FX_DWORD size) override;
+ uint32_t size) override;
void DeleteFont(void* hFont) override;
FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) override;
FX_BOOL GetFontCharset(void* hFont, int& charset) override;
@@ -424,8 +424,8 @@ class CFX_FolderFontInfo : public IFX_SystemFontInfo {
void ScanFile(const CFX_ByteString& path);
void ReportFace(const CFX_ByteString& path,
FXSYS_FILE* pFile,
- FX_DWORD filesize,
- FX_DWORD offset);
+ uint32_t filesize,
+ uint32_t offset);
void* GetSubstFont(const CFX_ByteString& face);
void* FindFont(int weight,
FX_BOOL bItalic,
@@ -442,7 +442,7 @@ class CFX_FolderFontInfo : public IFX_SystemFontInfo {
class CFX_CountedFaceCache {
public:
CFX_FaceCache* m_Obj;
- FX_DWORD m_nCount;
+ uint32_t m_nCount;
};
class CFX_FontCache {
@@ -480,32 +480,32 @@ class CFX_FaceCache {
explicit CFX_FaceCache(FXFT_Face face);
~CFX_FaceCache();
const CFX_GlyphBitmap* LoadGlyphBitmap(CFX_Font* pFont,
- FX_DWORD glyph_index,
+ uint32_t glyph_index,
FX_BOOL bFontStyle,
const CFX_Matrix* pMatrix,
int dest_width,
int anti_alias,
int& text_flags);
const CFX_PathData* LoadGlyphPath(CFX_Font* pFont,
- FX_DWORD glyph_index,
+ uint32_t glyph_index,
int dest_width);
private:
CFX_GlyphBitmap* RenderGlyph(CFX_Font* pFont,
- FX_DWORD glyph_index,
+ uint32_t glyph_index,
FX_BOOL bFontStyle,
const CFX_Matrix* pMatrix,
int dest_width,
int anti_alias);
CFX_GlyphBitmap* RenderGlyph_Nativetext(CFX_Font* pFont,
- FX_DWORD glyph_index,
+ uint32_t glyph_index,
const CFX_Matrix* pMatrix,
int dest_width,
int anti_alias);
CFX_GlyphBitmap* LookUpGlyphBitmap(CFX_Font* pFont,
const CFX_Matrix* pMatrix,
CFX_ByteStringC& FaceGlyphsKey,
- FX_DWORD glyph_index,
+ uint32_t glyph_index,
FX_BOOL bFontStyle,
int dest_width,
int anti_alias);
@@ -514,7 +514,7 @@ class CFX_FaceCache {
FXFT_Face const m_Face;
std::map<CFX_ByteString, CFX_SizeGlyphCache*> m_SizeMap;
- std::map<FX_DWORD, CFX_PathData*> m_PathMap;
+ std::map<uint32_t, CFX_PathData*> m_PathMap;
CFX_DIBitmap* m_pBitmap;
};
@@ -535,15 +535,15 @@ FX_RECT FXGE_GetGlyphsBBox(FXTEXT_GLYPHPOS* pGlyphAndPos,
class IFX_GSUBTable {
public:
static IFX_GSUBTable* Create(CFX_Font* pFont);
- virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) = 0;
+ virtual FX_BOOL GetVerticalGlyph(uint32_t glyphnum, uint32_t* vglyphnum) = 0;
protected:
virtual ~IFX_GSUBTable() {}
};
CFX_ByteString GetNameFromTT(const uint8_t* name_table,
- FX_DWORD name_table_size,
- FX_DWORD name);
+ uint32_t name_table_size,
+ uint32_t name);
int PDF_GetStandardFontName(CFX_ByteString* name);