Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1686)

Unified Diff: core/src/fpdfapi/fpdf_font/ttgsubtable.cpp

Issue 1293973002: Cleanup CFX_Font a bit. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp ('k') | core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: 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 81383fa8691896264256b6f97982e5215b2f7b0d..c45384feee22fdb175b4e6098ab9724a564c11b8 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();
}
}
« no previous file with comments | « core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp ('k') | core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698