| 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 #include "../../../include/fxge/fx_freetype.h" | 7 #include "ttgsubtable.h" |
| 8 #include "../../../include/fxge/fx_ge.h" | 8 |
| 9 #include "core/include/fxge/fx_freetype.h" |
| 10 #include "core/include/fxge/fx_ge.h" |
| 9 #include "third_party/base/nonstd_unique_ptr.h" | 11 #include "third_party/base/nonstd_unique_ptr.h" |
| 10 #include "ttgsubtable.h" | |
| 11 | 12 |
| 12 CFX_GlyphMap::CFX_GlyphMap() {} | 13 CFX_GlyphMap::CFX_GlyphMap() {} |
| 13 CFX_GlyphMap::~CFX_GlyphMap() {} | 14 CFX_GlyphMap::~CFX_GlyphMap() {} |
| 14 extern "C" { | 15 extern "C" { |
| 15 static int _CompareInt(const void* p1, const void* p2) { | 16 static int _CompareInt(const void* p1, const void* p2) { |
| 16 return (*(FX_DWORD*)p1) - (*(FX_DWORD*)p2); | 17 return (*(FX_DWORD*)p1) - (*(FX_DWORD*)p2); |
| 17 } | 18 } |
| 18 }; | 19 }; |
| 19 struct _IntPair { | 20 struct _IntPair { |
| 20 int32_t key; | 21 int32_t key; |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 FXFT_Load_Sfnt_Table(pFont->GetFace(), FT_MAKE_TAG('G', 'S', 'U', 'B'), 0, | 404 FXFT_Load_Sfnt_Table(pFont->GetFace(), FT_MAKE_TAG('G', 'S', 'U', 'B'), 0, |
| 404 pFont->GetSubData(), NULL); | 405 pFont->GetSubData(), NULL); |
| 405 if (!error && pFont->GetSubData()) { | 406 if (!error && pFont->GetSubData()) { |
| 406 nonstd::unique_ptr<CFX_GSUBTable> pGsubTable(new CFX_GSUBTable); | 407 nonstd::unique_ptr<CFX_GSUBTable> pGsubTable(new CFX_GSUBTable); |
| 407 if (pGsubTable->m_GsubImp.LoadGSUBTable((FT_Bytes)pFont->GetSubData())) { | 408 if (pGsubTable->m_GsubImp.LoadGSUBTable((FT_Bytes)pFont->GetSubData())) { |
| 408 return pGsubTable.release(); | 409 return pGsubTable.release(); |
| 409 } | 410 } |
| 410 } | 411 } |
| 411 return NULL; | 412 return NULL; |
| 412 } | 413 } |
| OLD | NEW |