OLD | NEW |
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> |
| 11 |
10 #include "core/fxcrt/include/fx_ext.h" | 12 #include "core/fxcrt/include/fx_ext.h" |
11 #include "core/fxge/include/fx_freetype.h" | 13 #include "core/fxge/include/fx_freetype.h" |
12 #include "third_party/freetype/include/freetype/fttypes.h" | 14 #include "third_party/freetype/include/freetype/fttypes.h" |
13 #include "xfa/fgas/font/fgas_font.h" | 15 #include "xfa/fgas/font/fgas_font.h" |
14 | 16 |
15 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 17 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
16 int32_t FX_GetSimilarValue(FX_FONTDESCRIPTOR const* pFont, | 18 int32_t FX_GetSimilarValue(FX_FONTDESCRIPTOR const* pFont, |
17 uint32_t dwFontStyles); | 19 uint32_t dwFontStyles); |
18 FX_FONTDESCRIPTOR const* FX_DefFontMatcher(FX_LPFONTMATCHPARAMS pParams, | 20 FX_FONTDESCRIPTOR const* FX_DefFontMatcher(FX_LPFONTMATCHPARAMS pParams, |
19 const CFX_FontDescriptors& fonts); | 21 const CFX_FontDescriptors& fonts); |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 FX_BOOL EnumFontsFromFontMapper(); | 189 FX_BOOL EnumFontsFromFontMapper(); |
188 FX_BOOL EnumFontsFromFiles(); | 190 FX_BOOL EnumFontsFromFiles(); |
189 | 191 |
190 protected: | 192 protected: |
191 void RegisterFace(FXFT_Face pFace, | 193 void RegisterFace(FXFT_Face pFace, |
192 CFX_FontDescriptors& Fonts, | 194 CFX_FontDescriptors& Fonts, |
193 const CFX_WideString* pFaceName); | 195 const CFX_WideString* pFaceName); |
194 void RegisterFaces(IFX_FileRead* pFontStream, | 196 void RegisterFaces(IFX_FileRead* pFontStream, |
195 const CFX_WideString* pFaceName); | 197 const CFX_WideString* pFaceName); |
196 void GetNames(const uint8_t* name_table, CFX_WideStringArray& Names); | 198 void GetNames(const uint8_t* name_table, CFX_WideStringArray& Names); |
197 void GetCharsets(FXFT_Face pFace, CFX_ArrayTemplate<uint16_t>& Charsets); | 199 std::vector<uint16_t> GetCharsets(FXFT_Face pFace) const; |
198 void GetUSBCSB(FXFT_Face pFace, uint32_t* USB, uint32_t* CSB); | 200 void GetUSBCSB(FXFT_Face pFace, uint32_t* USB, uint32_t* CSB); |
199 uint32_t GetFlags(FXFT_Face pFace); | 201 uint32_t GetFlags(FXFT_Face pFace); |
200 CFX_FontDescriptors m_InstalledFonts; | 202 CFX_FontDescriptors m_InstalledFonts; |
201 FX_BOOL VerifyUnicode(CFX_FontDescriptor* pDesc, FX_WCHAR wcUnicode); | 203 FX_BOOL VerifyUnicode(CFX_FontDescriptor* pDesc, FX_WCHAR wcUnicode); |
202 FX_BOOL VerifyUnicode(CFGAS_GEFont* pFont, FX_WCHAR wcUnicode); | 204 FX_BOOL VerifyUnicode(CFGAS_GEFont* pFont, FX_WCHAR wcUnicode); |
203 int32_t IsPartName(const CFX_WideString& Name1, const CFX_WideString& Name2); | 205 int32_t IsPartName(const CFX_WideString& Name1, const CFX_WideString& Name2); |
204 int32_t MatchFonts(CFX_FontDescriptorInfos& MatchedFonts, | 206 int32_t MatchFonts(CFX_FontDescriptorInfos& MatchedFonts, |
205 uint16_t wCodePage, | 207 uint16_t wCodePage, |
206 uint32_t dwFontStyles, | 208 uint32_t dwFontStyles, |
207 const CFX_WideString& FontName, | 209 const CFX_WideString& FontName, |
(...skipping 11 matching lines...) Expand all Loading... |
219 | 221 |
220 CFX_MapPtrTemplate<uint32_t, CFX_FontDescriptorInfos*> m_Hash2CandidateList; | 222 CFX_MapPtrTemplate<uint32_t, CFX_FontDescriptorInfos*> m_Hash2CandidateList; |
221 CFX_MapPtrTemplate<uint32_t, CFX_ArrayTemplate<CFGAS_GEFont*>*> m_Hash2Fonts; | 223 CFX_MapPtrTemplate<uint32_t, CFX_ArrayTemplate<CFGAS_GEFont*>*> m_Hash2Fonts; |
222 CFX_MapPtrTemplate<CFGAS_GEFont*, IFX_FileRead*> m_IFXFont2FileRead; | 224 CFX_MapPtrTemplate<CFGAS_GEFont*, IFX_FileRead*> m_IFXFont2FileRead; |
223 CFX_MapPtrTemplate<FX_WCHAR, CFGAS_GEFont*> m_FailedUnicodes2NULL; | 225 CFX_MapPtrTemplate<FX_WCHAR, CFGAS_GEFont*> m_FailedUnicodes2NULL; |
224 CFX_FontSourceEnum_File* const m_pFontSource; | 226 CFX_FontSourceEnum_File* const m_pFontSource; |
225 }; | 227 }; |
226 #endif | 228 #endif |
227 | 229 |
228 #endif // XFA_FGAS_FONT_FGAS_STDFONTMGR_H_ | 230 #endif // XFA_FGAS_FONT_FGAS_STDFONTMGR_H_ |
OLD | NEW |