| 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 CORE_INCLUDE_FXGE_FX_FONT_H_ | 7 #ifndef CORE_INCLUDE_FXGE_FX_FONT_H_ |
| 8 #define CORE_INCLUDE_FXGE_FX_FONT_H_ | 8 #define CORE_INCLUDE_FXGE_FX_FONT_H_ |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 void DeleteFace(); | 127 void DeleteFace(); |
| 128 | 128 |
| 129 protected: | 129 protected: |
| 130 FX_BOOL m_bEmbedded; | 130 FX_BOOL m_bEmbedded; |
| 131 FX_BOOL m_bVertical; | 131 FX_BOOL m_bVertical; |
| 132 void* m_pOwnedStream; | 132 void* m_pOwnedStream; |
| 133 }; | 133 }; |
| 134 #define ENCODING_INTERNAL 0 | 134 #define ENCODING_INTERNAL 0 |
| 135 #define ENCODING_UNICODE 1 | 135 #define ENCODING_UNICODE 1 |
| 136 | 136 |
| 137 class IFX_FontEncoding { | 137 class CFX_UnicodeEncoding { |
| 138 public: | 138 public: |
| 139 virtual ~IFX_FontEncoding() {} | 139 explicit CFX_UnicodeEncoding(CFX_Font* pFont); |
| 140 ~CFX_UnicodeEncoding(); |
| 140 | 141 |
| 141 virtual FX_DWORD GlyphFromCharCode(FX_DWORD charcode) = 0; | 142 FX_DWORD GlyphFromCharCode(FX_DWORD charcode); |
| 142 | 143 |
| 143 virtual CFX_WideString UnicodeFromCharCode(FX_DWORD charcode) const = 0; | 144 private: |
| 144 | 145 // Unowned, not nullptr. |
| 145 virtual FX_DWORD CharCodeFromUnicode(FX_WCHAR Unicode) const = 0; | 146 CFX_Font* m_pFont; |
| 146 }; | 147 }; |
| 147 | 148 |
| 148 IFX_FontEncoding* FXGE_CreateUnicodeEncoding(CFX_Font* pFont); | |
| 149 #define FXFONT_SUBST_MM 0x01 | 149 #define FXFONT_SUBST_MM 0x01 |
| 150 #define FXFONT_SUBST_GLYPHPATH 0x04 | 150 #define FXFONT_SUBST_GLYPHPATH 0x04 |
| 151 #define FXFONT_SUBST_CLEARTYPE 0x08 | 151 #define FXFONT_SUBST_CLEARTYPE 0x08 |
| 152 #define FXFONT_SUBST_TRANSFORM 0x10 | 152 #define FXFONT_SUBST_TRANSFORM 0x10 |
| 153 #define FXFONT_SUBST_NONSYMBOL 0x20 | 153 #define FXFONT_SUBST_NONSYMBOL 0x20 |
| 154 #define FXFONT_SUBST_EXACT 0x40 | 154 #define FXFONT_SUBST_EXACT 0x40 |
| 155 #define FXFONT_SUBST_STANDARD 0x80 | 155 #define FXFONT_SUBST_STANDARD 0x80 |
| 156 class CFX_SubstFont { | 156 class CFX_SubstFont { |
| 157 public: | 157 public: |
| 158 CFX_SubstFont(); | 158 CFX_SubstFont(); |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 class IFX_GSUBTable { | 445 class IFX_GSUBTable { |
| 446 public: | 446 public: |
| 447 static IFX_GSUBTable* Create(CFX_Font* pFont); | 447 static IFX_GSUBTable* Create(CFX_Font* pFont); |
| 448 virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) = 0; | 448 virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) = 0; |
| 449 | 449 |
| 450 protected: | 450 protected: |
| 451 virtual ~IFX_GSUBTable() {} | 451 virtual ~IFX_GSUBTable() {} |
| 452 }; | 452 }; |
| 453 | 453 |
| 454 #endif // CORE_INCLUDE_FXGE_FX_FONT_H_ | 454 #endif // CORE_INCLUDE_FXGE_FX_FONT_H_ |
| OLD | NEW |