Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Unified Diff: core/include/fxge/fx_font.h

Issue 1426403008: Cleanup some fxge font code. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | core/src/fxge/ge/fx_ge_fontmap.cpp » ('j') | core/src/fxge/ge/fx_ge_fontmap.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/include/fxge/fx_font.h
diff --git a/core/include/fxge/fx_font.h b/core/include/fxge/fx_font.h
index 3e4ca95299ce0998155433852fd82350f2f41962..c6643a5983a3161bcc32c014f79f719919535457 100644
--- a/core/include/fxge/fx_font.h
+++ b/core/include/fxge/fx_font.h
@@ -139,6 +139,7 @@ class CFX_UnicodeEncoding {
#define FXFONT_SUBST_NONSYMBOL 0x20
#define FXFONT_SUBST_EXACT 0x40
#define FXFONT_SUBST_STANDARD 0x80
+
class CFX_SubstFont {
public:
CFX_SubstFont();
@@ -385,6 +386,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,
@@ -397,10 +399,8 @@ class CFX_FaceCache {
FX_DWORD glyph_index,
int dest_width);
- CFX_FaceCache(FXFT_Face face);
-
private:
- FXFT_Face m_Face;
+ FXFT_Face const m_Face;
Tom Sepez 2015/11/09 18:05:17 nit: Someday we'll lose the *s in the typedefs, an
Lei Zhang 2015/11/09 18:41:03 I reordered the methods / variables.
CFX_GlyphBitmap* RenderGlyph(CFX_Font* pFont,
FX_DWORD glyph_index,
FX_BOOL bFontStyle,
@@ -426,11 +426,13 @@ class CFX_FaceCache {
void InitPlatform();
void DestroyPlatform();
};
-typedef struct {
+
+struct FXTEXT_GLYPHPOS {
const CFX_GlyphBitmap* m_pGlyph;
int m_OriginX, m_OriginY;
Tom Sepez 2015/11/09 18:05:17 nit: one per line (next line too).
Lei Zhang 2015/11/09 18:41:03 Done.
FX_FLOAT m_fOriginX, m_fOriginY;
-} FXTEXT_GLYPHPOS;
+};
+
FX_RECT FXGE_GetGlyphsBBox(FXTEXT_GLYPHPOS* pGlyphAndPos,
int nChars,
int anti_alias,
« no previous file with comments | « no previous file | core/src/fxge/ge/fx_ge_fontmap.cpp » ('j') | core/src/fxge/ge/fx_ge_fontmap.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698