summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font/cpdf_cidfont.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-08-11 05:37:47 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-11 05:37:47 +0000
commit0c7cf97859dd38f2cd94532cdd423abff7130853 (patch)
tree94f98372f3a5735fce9cd819f46f067b6214d6b0 /core/fpdfapi/font/cpdf_cidfont.cpp
parent74d2389d206da5638b642ca8084e140cfbf04c92 (diff)
downloadpdfium-0c7cf97859dd38f2cd94532cdd423abff7130853.tar.xz
Cleanup CFX_CTTGSUBTable.chromium/3521chromium/3520
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 <thestig@chromium.org> Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Diffstat (limited to 'core/fpdfapi/font/cpdf_cidfont.cpp')
-rw-r--r--core/fpdfapi/font/cpdf_cidfont.cpp6
1 files changed, 2 insertions, 4 deletions
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<CFX_CTTGSUBTable>();
- m_pTTGSUBTable->LoadGSUBTable((FT_Bytes)m_Font.GetSubData());
+ m_pTTGSUBTable = pdfium::MakeUnique<CFX_CTTGSUBTable>(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;