From 0c7cf97859dd38f2cd94532cdd423abff7130853 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Sat, 11 Aug 2018 05:37:47 +0000 Subject: Cleanup CFX_CTTGSUBTable. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Do all the parsing inside the constructor. Make GetVerticalGlyph() and related getters const methods. Change-Id: I21118cf98048cb6bbfc0999604d2434d4acafef6 Reviewed-on: https://pdfium-review.googlesource.com/39496 Commit-Queue: Lei Zhang Reviewed-by: Nicolás Peña Moreno --- core/fpdfapi/font/cpdf_cidfont.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'core/fpdfapi/font/cpdf_cidfont.cpp') diff --git a/core/fpdfapi/font/cpdf_cidfont.cpp b/core/fpdfapi/font/cpdf_cidfont.cpp index d38154331a..e118a91e87 100644 --- a/core/fpdfapi/font/cpdf_cidfont.cpp +++ b/core/fpdfapi/font/cpdf_cidfont.cpp @@ -577,14 +577,12 @@ int CPDF_CIDFont::GetGlyphIndex(uint32_t unicode, bool* pVertGlyph) { if (error || !m_Font.GetSubData()) return index; - m_pTTGSUBTable = pdfium::MakeUnique(); - m_pTTGSUBTable->LoadGSUBTable((FT_Bytes)m_Font.GetSubData()); + m_pTTGSUBTable = pdfium::MakeUnique(m_Font.GetSubData()); return GetVerticalGlyph(index, pVertGlyph); } int CPDF_CIDFont::GetVerticalGlyph(int index, bool* pVertGlyph) { - uint32_t vindex = 0; - m_pTTGSUBTable->GetVerticalGlyph(index, &vindex); + uint32_t vindex = m_pTTGSUBTable->GetVerticalGlyph(index); if (!vindex) return index; -- cgit v1.2.3