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

Side by Side Diff: core/fxge/cfx_fontmgr.h

Issue 2477443002: Remove FX_BOOL from core (Closed)
Patch Set: Created 4 years, 1 month 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 | « core/fxge/cfx_fontmapper.h ('k') | core/fxge/cfx_pathdata.h » ('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 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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 CORE_FXGE_CFX_FONTMGR_H_ 7 #ifndef CORE_FXGE_CFX_FONTMGR_H_
8 #define CORE_FXGE_CFX_FONTMGR_H_ 8 #define CORE_FXGE_CFX_FONTMGR_H_
9 9
10 #include <map> 10 #include <map>
11 #include <memory> 11 #include <memory>
12 12
13 #include "core/fxge/fx_font.h" 13 #include "core/fxge/fx_font.h"
14 14
15 class IFX_SystemFontInfo; 15 class IFX_SystemFontInfo;
16 class CFX_FontMapper; 16 class CFX_FontMapper;
17 class CFX_SubstFont; 17 class CFX_SubstFont;
18 class CTTFontDesc; 18 class CTTFontDesc;
19 19
20 class CFX_FontMgr { 20 class CFX_FontMgr {
21 public: 21 public:
22 CFX_FontMgr(); 22 CFX_FontMgr();
23 ~CFX_FontMgr(); 23 ~CFX_FontMgr();
24 24
25 void InitFTLibrary(); 25 void InitFTLibrary();
26 26
27 FXFT_Face GetCachedFace(const CFX_ByteString& face_name, 27 FXFT_Face GetCachedFace(const CFX_ByteString& face_name,
28 int weight, 28 int weight,
29 FX_BOOL bItalic, 29 bool bItalic,
30 uint8_t*& pFontData); 30 uint8_t*& pFontData);
31 FXFT_Face AddCachedFace(const CFX_ByteString& face_name, 31 FXFT_Face AddCachedFace(const CFX_ByteString& face_name,
32 int weight, 32 int weight,
33 FX_BOOL bItalic, 33 bool bItalic,
34 uint8_t* pData, 34 uint8_t* pData,
35 uint32_t size, 35 uint32_t size,
36 int face_index); 36 int face_index);
37 FXFT_Face GetCachedTTCFace(int ttc_size, 37 FXFT_Face GetCachedTTCFace(int ttc_size,
38 uint32_t checksum, 38 uint32_t checksum,
39 int font_offset, 39 int font_offset,
40 uint8_t*& pFontData); 40 uint8_t*& pFontData);
41 FXFT_Face AddCachedTTCFace(int ttc_size, 41 FXFT_Face AddCachedTTCFace(int ttc_size,
42 uint32_t checksum, 42 uint32_t checksum,
43 uint8_t* pData, 43 uint8_t* pData,
44 uint32_t size, 44 uint32_t size,
45 int font_offset); 45 int font_offset);
46 FXFT_Face GetFileFace(const FX_CHAR* filename, int face_index); 46 FXFT_Face GetFileFace(const FX_CHAR* filename, int face_index);
47 FXFT_Face GetFixedFace(const uint8_t* pData, uint32_t size, int face_index); 47 FXFT_Face GetFixedFace(const uint8_t* pData, uint32_t size, int face_index);
48 void ReleaseFace(FXFT_Face face); 48 void ReleaseFace(FXFT_Face face);
49 void SetSystemFontInfo(std::unique_ptr<IFX_SystemFontInfo> pFontInfo); 49 void SetSystemFontInfo(std::unique_ptr<IFX_SystemFontInfo> pFontInfo);
50 FXFT_Face FindSubstFont(const CFX_ByteString& face_name, 50 FXFT_Face FindSubstFont(const CFX_ByteString& face_name,
51 FX_BOOL bTrueType, 51 bool bTrueType,
52 uint32_t flags, 52 uint32_t flags,
53 int weight, 53 int weight,
54 int italic_angle, 54 int italic_angle,
55 int CharsetCP, 55 int CharsetCP,
56 CFX_SubstFont* pSubstFont); 56 CFX_SubstFont* pSubstFont);
57 bool GetBuiltinFont(size_t index, const uint8_t** pFontData, uint32_t* size); 57 bool GetBuiltinFont(size_t index, const uint8_t** pFontData, uint32_t* size);
58 CFX_FontMapper* GetBuiltinMapper() const { return m_pBuiltinMapper.get(); } 58 CFX_FontMapper* GetBuiltinMapper() const { return m_pBuiltinMapper.get(); }
59 FXFT_Library GetFTLibrary() const { return m_FTLibrary; } 59 FXFT_Library GetFTLibrary() const { return m_FTLibrary; }
60 bool FTLibrarySupportsHinting() const { return m_FTLibrarySupportsHinting; } 60 bool FTLibrarySupportsHinting() const { return m_FTLibrarySupportsHinting; }
61 61
62 private: 62 private:
63 std::unique_ptr<CFX_FontMapper> m_pBuiltinMapper; 63 std::unique_ptr<CFX_FontMapper> m_pBuiltinMapper;
64 std::map<CFX_ByteString, CTTFontDesc*> m_FaceMap; 64 std::map<CFX_ByteString, CTTFontDesc*> m_FaceMap;
65 FXFT_Library m_FTLibrary; 65 FXFT_Library m_FTLibrary;
66 bool m_FTLibrarySupportsHinting; 66 bool m_FTLibrarySupportsHinting;
67 }; 67 };
68 68
69 #endif // CORE_FXGE_CFX_FONTMGR_H_ 69 #endif // CORE_FXGE_CFX_FONTMGR_H_
OLDNEW
« no previous file with comments | « core/fxge/cfx_fontmapper.h ('k') | core/fxge/cfx_pathdata.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698