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

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

Issue 1297723002: CFX_MapByteStringToPtr considered harmful. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Separate reload & delete. Created 5 years, 4 months 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
Index: core/include/fxge/fx_font.h
diff --git a/core/include/fxge/fx_font.h b/core/include/fxge/fx_font.h
index 50cbba8e265b3d54f6d42397aa426a453f260869..dbc6a8057808dfb0a3352760f13dcaa4422ed6f4 100644
--- a/core/include/fxge/fx_font.h
+++ b/core/include/fxge/fx_font.h
@@ -14,13 +14,18 @@
typedef struct FT_FaceRec_* FXFT_Face;
typedef void* FXFT_Library;
-class IFX_FontEncoding;
-class CFX_PathData;
-class CFX_SubstFont;
+
class CFX_FaceCache;
+class CFX_FontFaceInfo;
class CFX_FontMapper;
-class IFX_SystemFontInfo;
+class CFX_PathData;
+class CFX_SizeGlyphCache;
+class CFX_SubstFont;
class CFontFileFaceInfo;
+class CTTFontDesc;
+class IFX_FontEncoding;
+class IFX_SystemFontInfo;
+
#define FXFONT_FIXED_PITCH 0x01
#define FXFONT_SERIF 0x02
#define FXFONT_SYMBOLIC 0x04
@@ -219,12 +224,11 @@ class CFX_FontMgr {
int italic_angle,
int CharsetCP,
CFX_SubstFont* pSubstFont);
-
void FreeCache();
-
FX_BOOL GetStandardFont(const uint8_t*& pFontData, FX_DWORD& size, int index);
+
CFX_FontMapper* m_pBuiltinMapper;
- CFX_MapByteStringToPtr m_FaceMap;
+ std::map<CFX_ByteString, CTTFontDesc*> m_FaceMap;
FXFT_Library m_FTLibrary;
FoxitFonts m_ExternalFonts[16];
};
@@ -334,7 +338,7 @@ class CFX_FolderFontInfo : public IFX_SystemFontInfo {
FX_BOOL GetFontCharset(void* hFont, int& charset) override;
protected:
- CFX_MapByteStringToPtr m_FontList;
+ std::map<CFX_ByteString, CFX_FontFaceInfo*> m_FontList;
CFX_ByteStringArray m_PathList;
CFX_FontMapper* m_pMapper;
void ScanPath(CFX_ByteString& path);
@@ -414,7 +418,7 @@ class CFX_FaceCache {
FX_BOOL bFontStyle,
int dest_width,
int anti_alias);
- CFX_MapByteStringToPtr m_SizeMap;
+ std::map<CFX_ByteString, CFX_SizeGlyphCache*> m_SizeMap;
CFX_MapPtrToPtr m_PathMap;
CFX_DIBitmap* m_pBitmap;

Powered by Google App Engine
This is Rietveld 408576698