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

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

Issue 2072803002: Make code compile with clang_use_chrome_plugin (final) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 4 years, 6 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/crt/fgas_utils.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"
11 #include "core/fxge/include/fx_freetype.h" 11 #include "core/fxge/include/fx_freetype.h"
12 #include "third_party/freetype/include/freetype/fttypes.h" 12 #include "third_party/freetype/include/freetype/fttypes.h"
13 #include "xfa/fgas/font/fgas_font.h" 13 #include "xfa/fgas/font/fgas_font.h"
14 14
15 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ 15 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
16 int32_t FX_GetSimilarValue(FX_FONTDESCRIPTOR const* pFont, 16 int32_t FX_GetSimilarValue(FX_FONTDESCRIPTOR const* pFont,
17 uint32_t dwFontStyles); 17 uint32_t dwFontStyles);
18 FX_FONTDESCRIPTOR const* FX_DefFontMatcher(FX_LPFONTMATCHPARAMS pParams, 18 FX_FONTDESCRIPTOR const* FX_DefFontMatcher(FX_LPFONTMATCHPARAMS pParams,
19 const CFX_FontDescriptors& fonts); 19 const CFX_FontDescriptors& fonts);
20 20
21 class CFGAS_StdFontMgrImp : public IFGAS_FontMgr { 21 class CFGAS_StdFontMgrImp : public IFGAS_FontMgr {
22 public: 22 public:
23 explicit CFGAS_StdFontMgrImp(FX_LPEnumAllFonts pEnumerator); 23 explicit CFGAS_StdFontMgrImp(FX_LPEnumAllFonts pEnumerator);
24 ~CFGAS_StdFontMgrImp() override; 24 ~CFGAS_StdFontMgrImp() override;
25 25
26 // IFGAS_FontMgr: 26 // IFGAS_FontMgr:
27 void Release() override { delete this; } 27 void Release() override;
28 CFGAS_GEFont* GetDefFontByCodePage( 28 CFGAS_GEFont* GetDefFontByCodePage(
29 uint16_t wCodePage, 29 uint16_t wCodePage,
30 uint32_t dwFontStyles, 30 uint32_t dwFontStyles,
31 const FX_WCHAR* pszFontFamily = NULL) override; 31 const FX_WCHAR* pszFontFamily = NULL) override;
32 CFGAS_GEFont* GetDefFontByCharset( 32 CFGAS_GEFont* GetDefFontByCharset(
33 uint8_t nCharset, 33 uint8_t nCharset,
34 uint32_t dwFontStyles, 34 uint32_t dwFontStyles,
35 const FX_WCHAR* pszFontFamily = NULL) override; 35 const FX_WCHAR* pszFontFamily = NULL) override;
36 CFGAS_GEFont* GetDefFontByUnicode( 36 CFGAS_GEFont* GetDefFontByUnicode(
37 FX_WCHAR wUnicode, 37 FX_WCHAR wUnicode,
(...skipping 20 matching lines...) Expand all
58 void RemoveFont(CFGAS_GEFont* pFont) override; 58 void RemoveFont(CFGAS_GEFont* pFont) override;
59 59
60 protected: 60 protected:
61 void RemoveFont(CFX_MapPtrToPtr& fontMap, CFGAS_GEFont* pFont); 61 void RemoveFont(CFX_MapPtrToPtr& fontMap, CFGAS_GEFont* pFont);
62 FX_FONTDESCRIPTOR const* FindFont(const FX_WCHAR* pszFontFamily, 62 FX_FONTDESCRIPTOR const* FindFont(const FX_WCHAR* pszFontFamily,
63 uint32_t dwFontStyles, 63 uint32_t dwFontStyles,
64 uint32_t dwMatchFlags, 64 uint32_t dwMatchFlags,
65 uint16_t wCodePage, 65 uint16_t wCodePage,
66 uint32_t dwUSB = 999, 66 uint32_t dwUSB = 999,
67 FX_WCHAR wUnicode = 0); 67 FX_WCHAR wUnicode = 0);
68 CFGAS_GEFont* GetFont(FX_FONTDESCRIPTOR const* pFD, uint32_t dwFontStyles);
69 68
70 FX_LPEnumAllFonts m_pEnumerator; 69 FX_LPEnumAllFonts m_pEnumerator;
71 CFX_FontDescriptors m_FontFaces; 70 CFX_FontDescriptors m_FontFaces;
72 CFX_ArrayTemplate<CFGAS_GEFont*> m_Fonts; 71 CFX_ArrayTemplate<CFGAS_GEFont*> m_Fonts;
73 CFX_MapPtrToPtr m_CPFonts; 72 CFX_MapPtrToPtr m_CPFonts;
74 CFX_MapPtrToPtr m_FamilyFonts; 73 CFX_MapPtrToPtr m_FamilyFonts;
75 CFX_MapPtrToPtr m_UnicodeFonts; 74 CFX_MapPtrToPtr m_UnicodeFonts;
76 CFX_MapPtrToPtr m_BufferFonts; 75 CFX_MapPtrToPtr m_BufferFonts;
77 CFX_MapPtrToPtr m_StreamFonts; 76 CFX_MapPtrToPtr m_StreamFonts;
78 CFX_MapPtrToPtr m_DeriveFonts; 77 CFX_MapPtrToPtr m_DeriveFonts;
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 219
221 CFX_MapPtrTemplate<uint32_t, CFX_FontDescriptorInfos*> m_Hash2CandidateList; 220 CFX_MapPtrTemplate<uint32_t, CFX_FontDescriptorInfos*> m_Hash2CandidateList;
222 CFX_MapPtrTemplate<uint32_t, CFX_ArrayTemplate<CFGAS_GEFont*>*> m_Hash2Fonts; 221 CFX_MapPtrTemplate<uint32_t, CFX_ArrayTemplate<CFGAS_GEFont*>*> m_Hash2Fonts;
223 CFX_MapPtrTemplate<CFGAS_GEFont*, IFX_FileRead*> m_IFXFont2FileRead; 222 CFX_MapPtrTemplate<CFGAS_GEFont*, IFX_FileRead*> m_IFXFont2FileRead;
224 CFX_MapPtrTemplate<FX_WCHAR, CFGAS_GEFont*> m_FailedUnicodes2NULL; 223 CFX_MapPtrTemplate<FX_WCHAR, CFGAS_GEFont*> m_FailedUnicodes2NULL;
225 CFX_FontSourceEnum_File* const m_pFontSource; 224 CFX_FontSourceEnum_File* const m_pFontSource;
226 }; 225 };
227 #endif 226 #endif
228 227
229 #endif // XFA_FGAS_FONT_FGAS_STDFONTMGR_H_ 228 #endif // XFA_FGAS_FONT_FGAS_STDFONTMGR_H_
OLDNEW
« no previous file with comments | « xfa/fgas/crt/fgas_utils.cpp ('k') | xfa/fgas/font/fgas_stdfontmgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698