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 _RAO_FONTMAP_H_ | 7 #ifndef _RAO_FONTMAP_H_ |
8 #define _RAO_FONTMAP_H_ | 8 #define _RAO_FONTMAP_H_ |
9 | 9 |
10 #if _MSC_VER > 1000 | 10 #if _MSC_VER > 1000 |
11 #pragma once | 11 #pragma once |
12 #endif // _MSC_VER > 1000 | 12 #endif // _MSC_VER > 1000 |
13 | 13 |
14 class CPDFSDK_Annot; | 14 class CPDFSDK_Annot; |
15 | 15 |
16 class CBA_FontMap : public CPWL_FontMap | 16 class CBA_FontMap : public CPWL_FontMap { |
17 { | 17 public: |
18 public: | 18 CBA_FontMap(CPDFSDK_Annot* pAnnot, IFX_SystemHandler* pSystemHandler); |
19 » CBA_FontMap(CPDFSDK_Annot* pAnnot, IFX_SystemHandler* pSystemHandler); | 19 CBA_FontMap(CPDF_Document* pDocument, |
20 » CBA_FontMap(CPDF_Document* pDocument, CPDF_Dictionary* pAnnotDict, IFX_S
ystemHandler* pSystemHandler); | 20 CPDF_Dictionary* pAnnotDict, |
| 21 IFX_SystemHandler* pSystemHandler); |
21 | 22 |
22 » virtual ~CBA_FontMap(); | 23 virtual ~CBA_FontMap(); |
23 | 24 |
24 » virtual void» » » » Initial(FX_LPCSTR fontname = NUL
L); | 25 virtual void Initial(FX_LPCSTR fontname = NULL); |
25 | 26 |
26 public: | 27 public: |
27 » void» » » » » » SetDefaultFont(CPDF_Font
* pFont, const CFX_ByteString & sFontName); | 28 void SetDefaultFont(CPDF_Font* pFont, const CFX_ByteString& sFontName); |
28 | 29 |
29 » void» » » » » » Reset(); | 30 void Reset(); |
30 » void» » » » » » SetAPType(const CFX_Byte
String& sAPType); | 31 void SetAPType(const CFX_ByteString& sAPType); |
31 | 32 |
32 protected: | 33 protected: |
33 » virtual CPDF_Font*» » » FindFontSameCharset(CFX_ByteStri
ng& sFontAlias, FX_INT32 nCharset); | 34 virtual CPDF_Font* FindFontSameCharset(CFX_ByteString& sFontAlias, |
34 » virtual void» » » » AddedFont(CPDF_Font* pFont, cons
t CFX_ByteString& sFontAlias); | 35 FX_INT32 nCharset); |
35 » virtual CPDF_Document*» » GetDocument(); | 36 virtual void AddedFont(CPDF_Font* pFont, const CFX_ByteString& sFontAlias); |
36 private: | 37 virtual CPDF_Document* GetDocument(); |
37 » CPDF_Font*» » » » » FindResFontSameCharset(C
PDF_Dictionary* pResDict, CFX_ByteString& sFontAlias, | |
38 » » » » » » » » » FX_INT32
nCharset); | |
39 » CPDF_Font*» » » » » GetAnnotDefaultFont(CFX_
ByteString &csNameTag); | |
40 » void» » » » » » AddFontToAnnotDict(CPDF_
Font* pFont, const CFX_ByteString& sAlias); | |
41 | 38 |
42 private: | 39 private: |
43 » CPDF_Document*» » » » m_pDocument; | 40 CPDF_Font* FindResFontSameCharset(CPDF_Dictionary* pResDict, |
44 » CPDF_Dictionary*» » » m_pAnnotDict; | 41 CFX_ByteString& sFontAlias, |
45 » CPDF_Font*» » » » » m_pDefaultFont; | 42 FX_INT32 nCharset); |
46 » CFX_ByteString» » » » m_sDefaultFontName; | 43 CPDF_Font* GetAnnotDefaultFont(CFX_ByteString& csNameTag); |
47 » | 44 void AddFontToAnnotDict(CPDF_Font* pFont, const CFX_ByteString& sAlias); |
48 » CFX_ByteString» » » » m_sAPType; | 45 |
| 46 private: |
| 47 CPDF_Document* m_pDocument; |
| 48 CPDF_Dictionary* m_pAnnotDict; |
| 49 CPDF_Font* m_pDefaultFont; |
| 50 CFX_ByteString m_sDefaultFontName; |
| 51 |
| 52 CFX_ByteString m_sAPType; |
49 }; | 53 }; |
50 | 54 |
51 #endif // _RAO_FONTMAP_H_ | 55 #endif // _RAO_FONTMAP_H_ |
OLD | NEW |