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

Side by Side Diff: xfa/fgas/font/fgas_stdfontmgr.h

Issue 1930533002: More IFX_ interface cleanup. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « xfa/fgas/font/fgas_gefont.cpp ('k') | xfa/fgas/font/fgas_stdfontmgr.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef XFA_FGAS_FONT_FGAS_STDFONTMGR_H_ 7 #ifndef XFA_FGAS_FONT_FGAS_STDFONTMGR_H_
8 #define XFA_FGAS_FONT_FGAS_STDFONTMGR_H_ 8 #define XFA_FGAS_FONT_FGAS_STDFONTMGR_H_
9 9
10 #include "core/fxcrt/include/fx_ext.h" 10 #include "core/fxcrt/include/fx_ext.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 struct FX_HandleParentPath { 119 struct FX_HandleParentPath {
120 FX_HandleParentPath() {} 120 FX_HandleParentPath() {}
121 FX_HandleParentPath(const FX_HandleParentPath& x) { 121 FX_HandleParentPath(const FX_HandleParentPath& x) {
122 pFileHandle = x.pFileHandle; 122 pFileHandle = x.pFileHandle;
123 bsParentPath = x.bsParentPath; 123 bsParentPath = x.bsParentPath;
124 } 124 }
125 void* pFileHandle; 125 void* pFileHandle;
126 CFX_ByteString bsParentPath; 126 CFX_ByteString bsParentPath;
127 }; 127 };
128 128
129 class CFX_FontSourceEnum_File : public IFX_FontSourceEnum { 129 class CFX_FontSourceEnum_File {
130 public: 130 public:
131 CFX_FontSourceEnum_File(); 131 CFX_FontSourceEnum_File();
132 virtual void Release() { delete this; } 132
133 virtual FX_POSITION GetStartPosition(); 133 void Release() { delete this; }
134 virtual IFX_FileAccess* GetNext(FX_POSITION& pos); 134 FX_POSITION GetStartPosition();
135 IFX_FileAccess* GetNext(FX_POSITION& pos);
135 136
136 private: 137 private:
137 CFX_ByteString GetNextFile(); 138 CFX_ByteString GetNextFile();
139
138 CFX_WideString m_wsNext; 140 CFX_WideString m_wsNext;
139 CFX_ObjectArray<FX_HandleParentPath> m_FolderQueue; 141 CFX_ObjectArray<FX_HandleParentPath> m_FolderQueue;
140 CFX_ByteStringArray m_FolderPaths; 142 CFX_ByteStringArray m_FolderPaths;
141 }; 143 };
144
142 typedef CFX_MapPtrTemplate<uint32_t, IFX_FileAccess*> CFX_HashFileMap; 145 typedef CFX_MapPtrTemplate<uint32_t, IFX_FileAccess*> CFX_HashFileMap;
143 typedef CFX_MapPtrTemplate<uint32_t, IFX_Font*> CFX_HashFontMap; 146 typedef CFX_MapPtrTemplate<uint32_t, IFX_Font*> CFX_HashFontMap;
144 typedef CFX_MapPtrTemplate<uint32_t, CFX_FontDescriptorInfos*> 147 typedef CFX_MapPtrTemplate<uint32_t, CFX_FontDescriptorInfos*>
145 CFX_HashFontDescsMap; 148 CFX_HashFontDescsMap;
146 typedef CFX_MapPtrTemplate<uint32_t, CFX_ArrayTemplate<IFX_Font*>*> 149 typedef CFX_MapPtrTemplate<uint32_t, CFX_ArrayTemplate<IFX_Font*>*>
147 CFX_HashFontsMap; 150 CFX_HashFontsMap;
148 typedef CFX_MapPtrTemplate<FX_WCHAR, IFX_Font*> CFX_UnicodeFontMap; 151 typedef CFX_MapPtrTemplate<FX_WCHAR, IFX_Font*> CFX_UnicodeFontMap;
149 typedef CFX_MapPtrTemplate<IFX_FileAccess*, CFX_ArrayTemplate<IFX_Font*>*> 152 typedef CFX_MapPtrTemplate<IFX_FileAccess*, CFX_ArrayTemplate<IFX_Font*>*>
150 CFX_FileFontMap; 153 CFX_FileFontMap;
151 typedef CFX_MapPtrTemplate<IFX_Font*, IFX_FileRead*> CFX_FonStreamtMap; 154 typedef CFX_MapPtrTemplate<IFX_Font*, IFX_FileRead*> CFX_FonStreamtMap;
152 155
153 class CFX_FontMgrImp : public IFX_FontMgr { 156 class CFX_FontMgrImp : public IFX_FontMgr {
154 public: 157 public:
155 CFX_FontMgrImp(IFX_FontSourceEnum* pFontEnum); 158 CFX_FontMgrImp(CFX_FontSourceEnum_File* pFontEnum);
159
156 virtual void Release(); 160 virtual void Release();
157 virtual IFX_Font* GetDefFontByCodePage(uint16_t wCodePage, 161 virtual IFX_Font* GetDefFontByCodePage(uint16_t wCodePage,
158 uint32_t dwFontStyles, 162 uint32_t dwFontStyles,
159 const FX_WCHAR* pszFontFamily = NULL); 163 const FX_WCHAR* pszFontFamily = NULL);
160 virtual IFX_Font* GetDefFontByCharset(uint8_t nCharset, 164 virtual IFX_Font* GetDefFontByCharset(uint8_t nCharset,
161 uint32_t dwFontStyles, 165 uint32_t dwFontStyles,
162 const FX_WCHAR* pszFontFamily = NULL); 166 const FX_WCHAR* pszFontFamily = NULL);
163 virtual IFX_Font* GetDefFontByUnicode(FX_WCHAR wUnicode, 167 virtual IFX_Font* GetDefFontByUnicode(FX_WCHAR wUnicode,
164 uint32_t dwFontStyles, 168 uint32_t dwFontStyles,
165 const FX_WCHAR* pszFontFamily = NULL); 169 const FX_WCHAR* pszFontFamily = NULL);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 IFX_SystemFontInfo* pSystemFontInfo, 236 IFX_SystemFontInfo* pSystemFontInfo,
233 uint32_t index); 237 uint32_t index);
234 IFX_FileRead* CreateFontStream(const CFX_ByteString& bsFaceName); 238 IFX_FileRead* CreateFontStream(const CFX_ByteString& bsFaceName);
235 239
236 CFX_HashFontDescsMap m_Hash2CandidateList; 240 CFX_HashFontDescsMap m_Hash2CandidateList;
237 CFX_HashFontsMap m_Hash2Fonts; 241 CFX_HashFontsMap m_Hash2Fonts;
238 CFX_HashFileMap m_Hash2FileAccess; 242 CFX_HashFileMap m_Hash2FileAccess;
239 CFX_HashFontMap m_FileAccess2IFXFont; 243 CFX_HashFontMap m_FileAccess2IFXFont;
240 CFX_FonStreamtMap m_IFXFont2FileRead; 244 CFX_FonStreamtMap m_IFXFont2FileRead;
241 CFX_UnicodeFontMap m_FailedUnicodes2NULL; 245 CFX_UnicodeFontMap m_FailedUnicodes2NULL;
242 IFX_FontSourceEnum* m_pFontSource; 246 CFX_FontSourceEnum_File* m_pFontSource;
243 }; 247 };
244 #endif 248 #endif
245 249
246 #endif // XFA_FGAS_FONT_FGAS_STDFONTMGR_H_ 250 #endif // XFA_FGAS_FONT_FGAS_STDFONTMGR_H_
OLDNEW
« no previous file with comments | « xfa/fgas/font/fgas_gefont.cpp ('k') | xfa/fgas/font/fgas_stdfontmgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698