summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-08-18 15:39:59 -0700
committerLei Zhang <thestig@chromium.org>2015-08-18 15:39:59 -0700
commite1ce94e0b045b443976c118a251400b4016f9811 (patch)
tree3df3a4e1b8ea6870d5dfbbac3c14269b988ee0a4 /core/src/fpdfapi/fpdf_font/ttgsubtable.cpp
parentbcfcc4619017b7f70c84a582196763894cc72d24 (diff)
downloadpdfium-e1ce94e0b045b443976c118a251400b4016f9811.tar.xz
Cleanup CFX_Font a bit.
- Make methods const. - Make variables non-public. - Remove LoadFile() method. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1293973002 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_font/ttgsubtable.cpp')
-rw-r--r--core/src/fpdfapi/fpdf_font/ttgsubtable.cpp16
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 81383fa869..c45384feee 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 = (unsigned char*)FX_Alloc(uint8_t, length);
+ pFont->SetSubData((uint8_t*)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();
}
}