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

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

Issue 2259823004: [XFA] Force destruction order of font managers. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Re-arrange header entries Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | 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 <vector> 10 #include <vector>
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 177
178 CFGAS_GEFont* LoadFont(const CFX_WideString& wsFaceName, 178 CFGAS_GEFont* LoadFont(const CFX_WideString& wsFaceName,
179 int32_t iFaceIndex, 179 int32_t iFaceIndex,
180 int32_t* pFaceCount); 180 int32_t* pFaceCount);
181 FX_BOOL EnumFonts(); 181 FX_BOOL EnumFonts();
182 FX_BOOL EnumFontsFromFontMapper(); 182 FX_BOOL EnumFontsFromFontMapper();
183 FX_BOOL EnumFontsFromFiles(); 183 FX_BOOL EnumFontsFromFiles();
184 184
185 protected: 185 protected:
186 void RegisterFace(FXFT_Face pFace, 186 void RegisterFace(FXFT_Face pFace,
187 CFX_FontDescriptors& Fonts,
188 const CFX_WideString* pFaceName); 187 const CFX_WideString* pFaceName);
189 void RegisterFaces(IFX_FileRead* pFontStream, 188 void RegisterFaces(IFX_FileRead* pFontStream,
190 const CFX_WideString* pFaceName); 189 const CFX_WideString* pFaceName);
191 void GetNames(const uint8_t* name_table, CFX_WideStringArray& Names); 190 void GetNames(const uint8_t* name_table, CFX_WideStringArray& Names);
192 std::vector<uint16_t> GetCharsets(FXFT_Face pFace) const; 191 std::vector<uint16_t> GetCharsets(FXFT_Face pFace) const;
193 void GetUSBCSB(FXFT_Face pFace, uint32_t* USB, uint32_t* CSB); 192 void GetUSBCSB(FXFT_Face pFace, uint32_t* USB, uint32_t* CSB);
194 uint32_t GetFlags(FXFT_Face pFace); 193 uint32_t GetFlags(FXFT_Face pFace);
195 CFX_FontDescriptors m_InstalledFonts;
196 FX_BOOL VerifyUnicode(CFX_FontDescriptor* pDesc, FX_WCHAR wcUnicode); 194 FX_BOOL VerifyUnicode(CFX_FontDescriptor* pDesc, FX_WCHAR wcUnicode);
197 FX_BOOL VerifyUnicode(CFGAS_GEFont* pFont, FX_WCHAR wcUnicode); 195 FX_BOOL VerifyUnicode(CFGAS_GEFont* pFont, FX_WCHAR wcUnicode);
198 int32_t IsPartName(const CFX_WideString& Name1, const CFX_WideString& Name2); 196 int32_t IsPartName(const CFX_WideString& Name1, const CFX_WideString& Name2);
199 int32_t MatchFonts(CFX_FontDescriptorInfos& MatchedFonts, 197 int32_t MatchFonts(CFX_FontDescriptorInfos& MatchedFonts,
200 uint16_t wCodePage, 198 uint16_t wCodePage,
201 uint32_t dwFontStyles, 199 uint32_t dwFontStyles,
202 const CFX_WideString& FontName, 200 const CFX_WideString& FontName,
203 FX_WCHAR wcUnicode = 0xFFFE); 201 FX_WCHAR wcUnicode = 0xFFFE);
204 int32_t CalcPenalty(CFX_FontDescriptor* pInstalled, 202 int32_t CalcPenalty(CFX_FontDescriptor* pInstalled,
205 uint16_t wCodePage, 203 uint16_t wCodePage,
206 uint32_t dwFontStyles, 204 uint32_t dwFontStyles,
207 const CFX_WideString& FontName, 205 const CFX_WideString& FontName,
208 FX_WCHAR wcUnicode = 0xFFFE); 206 FX_WCHAR wcUnicode = 0xFFFE);
209 FXFT_Face LoadFace(IFX_FileRead* pFontStream, int32_t iFaceIndex); 207 FXFT_Face LoadFace(IFX_FileRead* pFontStream, int32_t iFaceIndex);
210 IFX_FileRead* CreateFontStream(CFX_FontMapper* pFontMapper, 208 IFX_FileRead* CreateFontStream(CFX_FontMapper* pFontMapper,
211 IFX_SystemFontInfo* pSystemFontInfo, 209 IFX_SystemFontInfo* pSystemFontInfo,
212 uint32_t index); 210 uint32_t index);
213 IFX_FileRead* CreateFontStream(const CFX_ByteString& bsFaceName); 211 IFX_FileRead* CreateFontStream(const CFX_ByteString& bsFaceName);
214 212
213 CFX_FontDescriptors m_InstalledFonts;
215 CFX_MapPtrTemplate<uint32_t, CFX_FontDescriptorInfos*> m_Hash2CandidateList; 214 CFX_MapPtrTemplate<uint32_t, CFX_FontDescriptorInfos*> m_Hash2CandidateList;
216 CFX_MapPtrTemplate<uint32_t, CFX_ArrayTemplate<CFGAS_GEFont*>*> m_Hash2Fonts; 215 CFX_MapPtrTemplate<uint32_t, CFX_ArrayTemplate<CFGAS_GEFont*>*> m_Hash2Fonts;
217 CFX_MapPtrTemplate<CFGAS_GEFont*, IFX_FileRead*> m_IFXFont2FileRead; 216 CFX_MapPtrTemplate<CFGAS_GEFont*, IFX_FileRead*> m_IFXFont2FileRead;
218 CFX_MapPtrTemplate<FX_WCHAR, CFGAS_GEFont*> m_FailedUnicodes2Nullptr; 217 CFX_MapPtrTemplate<FX_WCHAR, CFGAS_GEFont*> m_FailedUnicodes2Nullptr;
219 CFX_FontSourceEnum_File* const m_pFontSource; 218 CFX_FontSourceEnum_File* const m_pFontSource;
220 }; 219 };
221 #endif 220 #endif
222 221
223 #endif // XFA_FGAS_FONT_FGAS_STDFONTMGR_H_ 222 #endif // XFA_FGAS_FONT_FGAS_STDFONTMGR_H_
OLDNEW
« no previous file with comments | « no previous file | xfa/fgas/font/fgas_stdfontmgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698