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

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

Issue 2002673002: Use std::map for CFX_GEFont::m_FontMapper (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 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_gefont.cpp » ('j') | xfa/fgas/font/fgas_gefont.cpp » ('J')
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_GEFONT_H_ 7 #ifndef XFA_FGAS_FONT_FGAS_GEFONT_H_
8 #define XFA_FGAS_FONT_FGAS_GEFONT_H_ 8 #define XFA_FGAS_FONT_FGAS_GEFONT_H_
9 9
10 #include <map>
11
10 #include "xfa/fgas/crt/fgas_utils.h" 12 #include "xfa/fgas/crt/fgas_utils.h"
11 #include "xfa/fgas/font/fgas_font.h" 13 #include "xfa/fgas/font/fgas_font.h"
12 14
13 #define FXFONT_SUBST_ITALIC 0x02 15 #define FXFONT_SUBST_ITALIC 0x02
14 16
15 class CXFA_PDFFontMgr; 17 class CXFA_PDFFontMgr;
16 18
17 class CFX_GEFont : public IFX_Font { 19 class CFX_GEFont : public IFX_Font {
18 public: 20 public:
19 CFX_GEFont(const CFX_GEFont& src, uint32_t dwFontStyles); 21 CFX_GEFont(const CFX_GEFont& src, uint32_t dwFontStyles);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 FX_BOOL m_bExtFont; 70 FX_BOOL m_bExtFont;
69 IFX_Stream* m_pStream; 71 IFX_Stream* m_pStream;
70 IFX_FileRead* m_pFileRead; 72 IFX_FileRead* m_pFileRead;
71 CFX_UnicodeEncoding* m_pFontEncoding; 73 CFX_UnicodeEncoding* m_pFontEncoding;
72 CFX_WordDiscreteArray* m_pCharWidthMap; 74 CFX_WordDiscreteArray* m_pCharWidthMap;
73 CFX_MassArrayTemplate<CFX_Rect>* m_pRectArray; 75 CFX_MassArrayTemplate<CFX_Rect>* m_pRectArray;
74 CFX_MapPtrToPtr* m_pBBoxMap; 76 CFX_MapPtrToPtr* m_pBBoxMap;
75 CXFA_PDFFontMgr* m_pProvider; 77 CXFA_PDFFontMgr* m_pProvider;
76 uint16_t m_wCharSet; 78 uint16_t m_wCharSet;
77 CFX_ArrayTemplate<IFX_Font*> m_SubstFonts; 79 CFX_ArrayTemplate<IFX_Font*> m_SubstFonts;
78 CFX_MapPtrToPtr m_FontMapper; 80 std::map<FX_WCHAR, IFX_Font*> m_FontMapper;
79 FX_BOOL InitFont(); 81 FX_BOOL InitFont();
80 FX_BOOL GetCharBBox(FX_WCHAR wUnicode, 82 FX_BOOL GetCharBBox(FX_WCHAR wUnicode,
81 CFX_Rect& bbox, 83 CFX_Rect& bbox,
82 FX_BOOL bRecursive, 84 FX_BOOL bRecursive,
83 FX_BOOL bCharCode = FALSE); 85 FX_BOOL bCharCode = FALSE);
84 FX_BOOL GetCharWidth(FX_WCHAR wUnicode, 86 FX_BOOL GetCharWidth(FX_WCHAR wUnicode,
85 int32_t& iWidth, 87 int32_t& iWidth,
86 FX_BOOL bRecursive, 88 FX_BOOL bRecursive,
87 FX_BOOL bCharCode = FALSE); 89 FX_BOOL bCharCode = FALSE);
88 int32_t GetGlyphIndex(FX_WCHAR wUnicode, 90 int32_t GetGlyphIndex(FX_WCHAR wUnicode,
89 FX_BOOL bRecursive, 91 FX_BOOL bRecursive,
90 IFX_Font** ppFont, 92 IFX_Font** ppFont,
91 FX_BOOL bCharCode = FALSE); 93 FX_BOOL bCharCode = FALSE);
92 }; 94 };
93 95
94 #endif // XFA_FGAS_FONT_FGAS_GEFONT_H_ 96 #endif // XFA_FGAS_FONT_FGAS_GEFONT_H_
OLDNEW
« no previous file with comments | « no previous file | xfa/fgas/font/fgas_gefont.cpp » ('j') | xfa/fgas/font/fgas_gefont.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698