| 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_SRC_FPDFAPI_FPDF_FONT_TTGSUBTABLE_H_ | 7 #ifndef CORE_SRC_FPDFAPI_FPDF_FONT_TTGSUBTABLE_H_ |
| 8 #define CORE_SRC_FPDFAPI_FPDF_FONT_TTGSUBTABLE_H_ | 8 #define CORE_SRC_FPDFAPI_FPDF_FONT_TTGSUBTABLE_H_ |
| 9 | 9 |
| 10 #include "../../../include/fxge/fx_freetype.h" | 10 #include "../../../include/fxge/fx_freetype.h" |
| 11 #include "../../../include/fxcrt/fx_basic.h" | 11 #include "../../../include/fxcrt/fx_basic.h" |
| 12 #include "common.h" | 12 #include "common.h" |
| 13 | 13 |
| 14 class CFX_GlyphMap { | 14 class CFX_GlyphMap { |
| 15 public: | 15 public: |
| 16 CFX_GlyphMap(); | 16 CFX_GlyphMap(); |
| 17 ~CFX_GlyphMap(); | 17 ~CFX_GlyphMap(); |
| 18 void SetAt(int key, int value); | 18 void SetAt(int key, int value); |
| 19 FX_BOOL Lookup(int key, int& value); | 19 FX_BOOL Lookup(int key, int& value); |
| 20 | 20 |
| 21 protected: | 21 protected: |
| 22 CFX_BinaryBuf m_Buffer; | 22 CFX_BinaryBuf m_Buffer; |
| 23 }; | 23 }; |
| 24 class CFX_CTTGSUBTable { | 24 class CFX_CTTGSUBTable { |
| 25 public: | 25 public: |
| 26 CFX_CTTGSUBTable(void) : m_bFeautureMapLoad(FALSE), loaded(false){}; | 26 CFX_CTTGSUBTable(void) : m_bFeautureMapLoad(FALSE), loaded(false) {} |
| 27 CFX_CTTGSUBTable(FT_Bytes gsub) : m_bFeautureMapLoad(FALSE), loaded(false) { | 27 CFX_CTTGSUBTable(FT_Bytes gsub) : m_bFeautureMapLoad(FALSE), loaded(false) { |
| 28 LoadGSUBTable(gsub); | 28 LoadGSUBTable(gsub); |
| 29 } | 29 } |
| 30 virtual ~CFX_CTTGSUBTable() {} | 30 virtual ~CFX_CTTGSUBTable() {} |
| 31 bool IsOk(void) const { return loaded; } | 31 bool IsOk(void) const { return loaded; } |
| 32 bool LoadGSUBTable(FT_Bytes gsub); | 32 bool LoadGSUBTable(FT_Bytes gsub); |
| 33 bool GetVerticalGlyph(TT_uint32_t glyphnum, TT_uint32_t* vglyphnum); | 33 bool GetVerticalGlyph(TT_uint32_t glyphnum, TT_uint32_t* vglyphnum); |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 struct tt_gsub_header { | 36 struct tt_gsub_header { |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 class CFX_GSUBTable final : public IFX_GSUBTable { | 352 class CFX_GSUBTable final : public IFX_GSUBTable { |
| 353 public: | 353 public: |
| 354 ~CFX_GSUBTable() override {} | 354 ~CFX_GSUBTable() override {} |
| 355 virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, | 355 virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, |
| 356 FX_DWORD* vglyphnum) override; | 356 FX_DWORD* vglyphnum) override; |
| 357 | 357 |
| 358 CFX_CTTGSUBTable m_GsubImp; | 358 CFX_CTTGSUBTable m_GsubImp; |
| 359 }; | 359 }; |
| 360 | 360 |
| 361 #endif // CORE_SRC_FPDFAPI_FPDF_FONT_TTGSUBTABLE_H_ | 361 #endif // CORE_SRC_FPDFAPI_FPDF_FONT_TTGSUBTABLE_H_ |
| OLD | NEW |