summaryrefslogtreecommitdiff
path: root/core/include/fxge/fx_font.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-11-09 10:48:13 -0800
committerLei Zhang <thestig@chromium.org>2015-11-09 10:48:13 -0800
commit3beeeeeb2ca45d54b34e4cc80fb137980e2f7aae (patch)
treecbf3e546569962e733c515f81e022506c7334a5f /core/include/fxge/fx_font.h
parent8698aff8381399e82bafa892ed9f0e605065e45c (diff)
downloadpdfium-3beeeeeb2ca45d54b34e4cc80fb137980e2f7aae.tar.xz
Merge to XFA: Cleanup some fxge font code.
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1426403008 . (cherry picked from commit 94a4956f7aadc10fe6dd8451e965bd7447985b76) Review URL: https://codereview.chromium.org/1410683013 .
Diffstat (limited to 'core/include/fxge/fx_font.h')
-rw-r--r--core/include/fxge/fx_font.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/core/include/fxge/fx_font.h b/core/include/fxge/fx_font.h
index b9dce1c435..4d81ac4b50 100644
--- a/core/include/fxge/fx_font.h
+++ b/core/include/fxge/fx_font.h
@@ -189,6 +189,7 @@ CFX_UnicodeEncodingEx* FX_CreateFontEncodingEx(
#define FXFONT_SUBST_NONSYMBOL 0x20
#define FXFONT_SUBST_EXACT 0x40
#define FXFONT_SUBST_STANDARD 0x80
+
class CFX_SubstFont {
public:
CFX_SubstFont();
@@ -451,6 +452,7 @@ class CFX_GlyphBitmap {
};
class CFX_FaceCache {
public:
+ explicit CFX_FaceCache(FXFT_Face face);
~CFX_FaceCache();
const CFX_GlyphBitmap* LoadGlyphBitmap(CFX_Font* pFont,
FX_DWORD glyph_index,
@@ -463,10 +465,7 @@ class CFX_FaceCache {
FX_DWORD glyph_index,
int dest_width);
- CFX_FaceCache(FXFT_Face face);
-
private:
- FXFT_Face m_Face;
CFX_GlyphBitmap* RenderGlyph(CFX_Font* pFont,
FX_DWORD glyph_index,
FX_BOOL bFontStyle,
@@ -485,18 +484,23 @@ class CFX_FaceCache {
FX_BOOL bFontStyle,
int dest_width,
int anti_alias);
+ void InitPlatform();
+ void DestroyPlatform();
+
+ FXFT_Face const m_Face;
std::map<CFX_ByteString, CFX_SizeGlyphCache*> m_SizeMap;
CFX_MapPtrToPtr m_PathMap;
CFX_DIBitmap* m_pBitmap;
-
- void InitPlatform();
- void DestroyPlatform();
};
-typedef struct {
+
+struct FXTEXT_GLYPHPOS {
const CFX_GlyphBitmap* m_pGlyph;
- int m_OriginX, m_OriginY;
- FX_FLOAT m_fOriginX, m_fOriginY;
-} FXTEXT_GLYPHPOS;
+ int m_OriginX;
+ int m_OriginY;
+ FX_FLOAT m_fOriginX;
+ FX_FLOAT m_fOriginY;
+};
+
FX_RECT FXGE_GetGlyphsBBox(FXTEXT_GLYPHPOS* pGlyphAndPos,
int nChars,
int anti_alias,