diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-10-23 12:37:42 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-10-23 12:37:42 -0700 |
commit | 1b04bcc6af13669920700322052fc4ab4fad47a2 (patch) | |
tree | 14a70efd6df9acf3e5e0a611415e95955f1b5d8f /core/src/fpdfapi/fpdf_font/ttgsubtable.cpp | |
parent | 2a4e4ce8efaf8b6466962eef292a9876c17976ad (diff) | |
download | pdfium-1b04bcc6af13669920700322052fc4ab4fad47a2.tar.xz |
XFA: Manually apply changes to fpdf_text.h and fx_font.h from master
Driven off of https://codereview.chromium.org/1398383002/
Then make the other files as similar as possible. Note that this
required changes to xfa/ code, and required adding some Set() methods.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1411833003 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_font/ttgsubtable.cpp')
-rw-r--r-- | core/src/fpdfapi/fpdf_font/ttgsubtable.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp b/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp index 2ed586e0a3..6c1b4263b1 100644 --- a/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp +++ b/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp @@ -388,23 +388,23 @@ IFX_GSUBTable* IFX_GSUBTable::Create(CFX_Font* pFont) { if (!pFont) { return NULL; } - if (NULL == pFont->m_pGsubData) { + if (!pFont->GetSubData()) { unsigned long length = 0; int error = FXFT_Load_Sfnt_Table( - pFont->m_Face, FT_MAKE_TAG('G', 'S', 'U', 'B'), 0, NULL, &length); + pFont->GetFace(), FT_MAKE_TAG('G', 'S', 'U', 'B'), 0, NULL, &length); if (!error) { - pFont->m_pGsubData = FX_Alloc(uint8_t, length); + pFont->SetSubData(FX_Alloc(uint8_t, length)); } - if (!pFont->m_pGsubData) { + if (!pFont->GetSubData()) { return NULL; } } int error = - FXFT_Load_Sfnt_Table(pFont->m_Face, FT_MAKE_TAG('G', 'S', 'U', 'B'), 0, - pFont->m_pGsubData, NULL); - if (!error && pFont->m_pGsubData) { + FXFT_Load_Sfnt_Table(pFont->GetFace(), FT_MAKE_TAG('G', 'S', 'U', 'B'), 0, + pFont->GetSubData(), NULL); + if (!error && pFont->GetSubData()) { nonstd::unique_ptr<CFX_GSUBTable> pGsubTable(new CFX_GSUBTable); - if (pGsubTable->m_GsubImp.LoadGSUBTable((FT_Bytes)pFont->m_pGsubData)) { + if (pGsubTable->m_GsubImp.LoadGSUBTable((FT_Bytes)pFont->GetSubData())) { return pGsubTable.release(); } } |