| 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_FPDFAPI_FPDF_FONT_TTGSUBTABLE_H_ | 7 #ifndef CORE_FPDFAPI_FPDF_FONT_TTGSUBTABLE_H_ |
| 8 #define CORE_FPDFAPI_FPDF_FONT_TTGSUBTABLE_H_ | 8 #define CORE_FPDFAPI_FPDF_FONT_TTGSUBTABLE_H_ |
| 9 | 9 |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| 11 | 11 |
| 12 #include <map> | 12 #include <map> |
| 13 | 13 |
| 14 #include "core/fxcrt/include/fx_basic.h" | 14 #include "core/fxcrt/include/fx_basic.h" |
| 15 #include "core/fxge/include/fx_font.h" | 15 #include "core/fxge/include/fx_font.h" |
| 16 #include "core/fxge/include/fx_freetype.h" | 16 #include "core/fxge/include/fx_freetype.h" |
| 17 | 17 |
| 18 class CFX_GlyphMap { | 18 class CFX_GlyphMap { |
| 19 public: | 19 public: |
| 20 CFX_GlyphMap(); | 20 CFX_GlyphMap(); |
| 21 ~CFX_GlyphMap(); | 21 ~CFX_GlyphMap(); |
| 22 void SetAt(int key, int value); | 22 void SetAt(int key, int value); |
| 23 FX_BOOL Lookup(int key, int& value); | 23 FX_BOOL Lookup(int key, int& value); |
| 24 | 24 |
| 25 protected: | 25 protected: |
| 26 CFX_BinaryBuf m_Buffer; | 26 CFX_BinaryBuf m_Buffer; |
| 27 }; | 27 }; |
| 28 |
| 28 class CFX_CTTGSUBTable { | 29 class CFX_CTTGSUBTable { |
| 29 public: | 30 public: |
| 30 CFX_CTTGSUBTable(void) : m_bFeautureMapLoad(FALSE), loaded(false) {} | 31 CFX_CTTGSUBTable(void) : m_bFeautureMapLoad(FALSE), loaded(false) {} |
| 31 CFX_CTTGSUBTable(FT_Bytes gsub) : m_bFeautureMapLoad(FALSE), loaded(false) { | 32 CFX_CTTGSUBTable(FT_Bytes gsub) : m_bFeautureMapLoad(FALSE), loaded(false) { |
| 32 LoadGSUBTable(gsub); | 33 LoadGSUBTable(gsub); |
| 33 } | 34 } |
| 34 virtual ~CFX_CTTGSUBTable() {} | 35 virtual ~CFX_CTTGSUBTable() {} |
| 35 bool IsOk(void) const { return loaded; } | 36 bool IsOk(void) const { return loaded; } |
| 36 bool LoadGSUBTable(FT_Bytes gsub); | 37 bool LoadGSUBTable(FT_Bytes gsub); |
| 37 bool GetVerticalGlyph(uint32_t glyphnum, uint32_t* vglyphnum); | 38 bool GetVerticalGlyph(uint32_t glyphnum, uint32_t* vglyphnum); |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 return ret; | 346 return ret; |
| 346 } | 347 } |
| 347 std::map<uint32_t, uint32_t> m_featureMap; | 348 std::map<uint32_t, uint32_t> m_featureMap; |
| 348 FX_BOOL m_bFeautureMapLoad; | 349 FX_BOOL m_bFeautureMapLoad; |
| 349 bool loaded; | 350 bool loaded; |
| 350 struct tt_gsub_header header; | 351 struct tt_gsub_header header; |
| 351 struct TScriptList ScriptList; | 352 struct TScriptList ScriptList; |
| 352 struct TFeatureList FeatureList; | 353 struct TFeatureList FeatureList; |
| 353 struct TLookupList LookupList; | 354 struct TLookupList LookupList; |
| 354 }; | 355 }; |
| 355 class CFX_GSUBTable final : public IFX_GSUBTable { | |
| 356 public: | |
| 357 ~CFX_GSUBTable() override {} | |
| 358 FX_BOOL GetVerticalGlyph(uint32_t glyphnum, uint32_t* vglyphnum) override; | |
| 359 | |
| 360 CFX_CTTGSUBTable m_GsubImp; | |
| 361 }; | |
| 362 | 356 |
| 363 #endif // CORE_FPDFAPI_FPDF_FONT_TTGSUBTABLE_H_ | 357 #endif // CORE_FPDFAPI_FPDF_FONT_TTGSUBTABLE_H_ |
| OLD | NEW |