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

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

Issue 2535723010: Rename IFX_Stream to IFGAS_Stream. (Closed)
Patch Set: rename more to IFGAS, {} Created 4 years 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_stream.cpp ('k') | xfa/fgas/font/cfgas_gefont.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_CFGAS_GEFONT_H_ 7 #ifndef XFA_FGAS_FONT_CFGAS_GEFONT_H_
8 #define XFA_FGAS_FONT_CFGAS_GEFONT_H_ 8 #define XFA_FGAS_FONT_CFGAS_GEFONT_H_
9 9
10 #include <map> 10 #include <map>
(...skipping 15 matching lines...) Expand all
26 uint16_t wCodePage, 26 uint16_t wCodePage,
27 CFGAS_FontMgr* pFontMgr); 27 CFGAS_FontMgr* pFontMgr);
28 static CFGAS_GEFont* LoadFont(CFX_Font* pExternalFont, 28 static CFGAS_GEFont* LoadFont(CFX_Font* pExternalFont,
29 CFGAS_FontMgr* pFontMgr); 29 CFGAS_FontMgr* pFontMgr);
30 static CFGAS_GEFont* LoadFont(std::unique_ptr<CFX_Font> pInternalFont, 30 static CFGAS_GEFont* LoadFont(std::unique_ptr<CFX_Font> pInternalFont,
31 CFGAS_FontMgr* pFontMgr); 31 CFGAS_FontMgr* pFontMgr);
32 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ 32 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
33 static CFGAS_GEFont* LoadFont(const uint8_t* pBuffer, 33 static CFGAS_GEFont* LoadFont(const uint8_t* pBuffer,
34 int32_t iLength, 34 int32_t iLength,
35 CFGAS_FontMgr* pFontMgr); 35 CFGAS_FontMgr* pFontMgr);
36 static CFGAS_GEFont* LoadFont(IFX_Stream* pFontStream, 36 static CFGAS_GEFont* LoadFont(IFGAS_Stream* pFontStream,
37 CFGAS_FontMgr* pFontMgr, 37 CFGAS_FontMgr* pFontMgr,
38 bool bSaveStream); 38 bool bSaveStream);
39 #endif 39 #endif
40 40
41 ~CFGAS_GEFont(); 41 ~CFGAS_GEFont();
42 42
43 void Release(); 43 void Release();
44 CFGAS_GEFont* Retain(); 44 CFGAS_GEFont* Retain();
45 CFGAS_GEFont* Derive(uint32_t dwFontStyles, uint16_t wCodePage = 0); 45 CFGAS_GEFont* Derive(uint32_t dwFontStyles, uint16_t wCodePage = 0);
46 uint32_t GetFontStyles() const; 46 uint32_t GetFontStyles() const;
(...skipping 15 matching lines...) Expand all
62 62
63 private: 63 private:
64 explicit CFGAS_GEFont(CFGAS_FontMgr* pFontMgr); 64 explicit CFGAS_GEFont(CFGAS_FontMgr* pFontMgr);
65 CFGAS_GEFont(CFGAS_GEFont* src, uint32_t dwFontStyles); 65 CFGAS_GEFont(CFGAS_GEFont* src, uint32_t dwFontStyles);
66 66
67 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ 67 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
68 bool LoadFontInternal(const FX_WCHAR* pszFontFamily, 68 bool LoadFontInternal(const FX_WCHAR* pszFontFamily,
69 uint32_t dwFontStyles, 69 uint32_t dwFontStyles,
70 uint16_t wCodePage); 70 uint16_t wCodePage);
71 bool LoadFontInternal(const uint8_t* pBuffer, int32_t length); 71 bool LoadFontInternal(const uint8_t* pBuffer, int32_t length);
72 bool LoadFontInternal(IFX_Stream* pFontStream, bool bSaveStream); 72 bool LoadFontInternal(IFGAS_Stream* pFontStream, bool bSaveStream);
73 #endif 73 #endif
74 bool LoadFontInternal(CFX_Font* pExternalFont); 74 bool LoadFontInternal(CFX_Font* pExternalFont);
75 bool LoadFontInternal(std::unique_ptr<CFX_Font> pInternalFont); 75 bool LoadFontInternal(std::unique_ptr<CFX_Font> pInternalFont);
76 bool InitFont(); 76 bool InitFont();
77 bool GetCharBBoxInternal(FX_WCHAR wUnicode, 77 bool GetCharBBoxInternal(FX_WCHAR wUnicode,
78 CFX_Rect& bbox, 78 CFX_Rect& bbox,
79 bool bRecursive, 79 bool bRecursive,
80 bool bCharCode = false); 80 bool bCharCode = false);
81 bool GetCharWidthInternal(FX_WCHAR wUnicode, 81 bool GetCharWidthInternal(FX_WCHAR wUnicode,
82 int32_t& iWidth, 82 int32_t& iWidth,
83 bool bRecursive, 83 bool bRecursive,
84 bool bCharCode); 84 bool bCharCode);
85 int32_t GetGlyphIndex(FX_WCHAR wUnicode, 85 int32_t GetGlyphIndex(FX_WCHAR wUnicode,
86 bool bRecursive, 86 bool bRecursive,
87 CFGAS_GEFont** ppFont, 87 CFGAS_GEFont** ppFont,
88 bool bCharCode = false); 88 bool bCharCode = false);
89 CFX_WideString GetFamilyName() const; 89 CFX_WideString GetFamilyName() const;
90 90
91 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ 91 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
92 bool m_bUseLogFontStyle; 92 bool m_bUseLogFontStyle;
93 uint32_t m_dwLogFontStyle; 93 uint32_t m_dwLogFontStyle;
94 #endif 94 #endif
95 CFX_Font* m_pFont; 95 CFX_Font* m_pFont;
96 CFGAS_GEFont* const m_pSrcFont; 96 CFGAS_GEFont* const m_pSrcFont;
97 CFGAS_FontMgr* const m_pFontMgr; 97 CFGAS_FontMgr* const m_pFontMgr;
98 int32_t m_iRefCount; 98 int32_t m_iRefCount;
99 bool m_bExternalFont; 99 bool m_bExternalFont;
100 std::unique_ptr<IFX_Stream, ReleaseDeleter<IFX_Stream>> m_pStream; 100 std::unique_ptr<IFGAS_Stream, ReleaseDeleter<IFGAS_Stream>> m_pStream;
101 std::unique_ptr<IFX_SeekableReadStream, 101 std::unique_ptr<IFX_SeekableReadStream,
102 ReleaseDeleter<IFX_SeekableReadStream>> 102 ReleaseDeleter<IFX_SeekableReadStream>>
103 m_pFileRead; 103 m_pFileRead;
104 std::unique_ptr<CFX_UnicodeEncoding> m_pFontEncoding; 104 std::unique_ptr<CFX_UnicodeEncoding> m_pFontEncoding;
105 std::unique_ptr<CFX_DiscreteArrayTemplate<uint16_t>> m_pCharWidthMap; 105 std::unique_ptr<CFX_DiscreteArrayTemplate<uint16_t>> m_pCharWidthMap;
106 std::unique_ptr<CFX_MassArrayTemplate<CFX_Rect>> m_pRectArray; 106 std::unique_ptr<CFX_MassArrayTemplate<CFX_Rect>> m_pRectArray;
107 std::unique_ptr<CFX_MapPtrToPtr> m_pBBoxMap; 107 std::unique_ptr<CFX_MapPtrToPtr> m_pBBoxMap;
108 CXFA_PDFFontMgr* m_pProvider; // not owned. 108 CXFA_PDFFontMgr* m_pProvider; // not owned.
109 CFX_ArrayTemplate<CFGAS_GEFont*> m_SubstFonts; 109 CFX_ArrayTemplate<CFGAS_GEFont*> m_SubstFonts;
110 std::map<FX_WCHAR, CFGAS_GEFont*> m_FontMapper; 110 std::map<FX_WCHAR, CFGAS_GEFont*> m_FontMapper;
111 }; 111 };
112 112
113 #endif // XFA_FGAS_FONT_CFGAS_GEFONT_H_ 113 #endif // XFA_FGAS_FONT_CFGAS_GEFONT_H_
OLDNEW
« no previous file with comments | « xfa/fgas/crt/fgas_stream.cpp ('k') | xfa/fgas/font/cfgas_gefont.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698