From 1b04bcc6af13669920700322052fc4ab4fad47a2 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 23 Oct 2015 12:37:42 -0700 Subject: 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 . --- core/src/fpdfapi/fpdf_font/ttgsubtable.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'core/src/fpdfapi/fpdf_font/ttgsubtable.cpp') 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 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(); } } -- cgit v1.2.3