summaryrefslogtreecommitdiff
path: root/core/fxge/ge/cfx_fontmgr.cpp
diff options
context:
space:
mode:
authornpm <npm@chromium.org>2016-10-11 13:21:34 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-11 13:21:34 -0700
commita91b8d395ac8f6aed38cccfda1f38de11dd45bdd (patch)
tree97dc87ed807533cc7599dc8e100746b07dc62456 /core/fxge/ge/cfx_fontmgr.cpp
parentf3fbe83a0f6c1dfb05722a6f0a4056c53548fb6e (diff)
downloadpdfium-a91b8d395ac8f6aed38cccfda1f38de11dd45bdd.tar.xz
Deleted unused members in CTTFontDesc
Review-Url: https://codereview.chromium.org/2408213002
Diffstat (limited to 'core/fxge/ge/cfx_fontmgr.cpp')
-rw-r--r--core/fxge/ge/cfx_fontmgr.cpp24
1 files changed, 11 insertions, 13 deletions
diff --git a/core/fxge/ge/cfx_fontmgr.cpp b/core/fxge/ge/cfx_fontmgr.cpp
index 95a2b662ed..981a9be288 100644
--- a/core/fxge/ge/cfx_fontmgr.cpp
+++ b/core/fxge/ge/cfx_fontmgr.cpp
@@ -132,7 +132,7 @@ FXFT_Face CFX_FontMgr::GetCachedFace(const CFX_ByteString& face_name,
CTTFontDesc* pFontDesc = it->second;
pFontData = pFontDesc->m_pFontData;
pFontDesc->m_RefCount++;
- return pFontDesc->m_SingleFace.m_pFace;
+ return pFontDesc->m_SingleFace;
}
FXFT_Face CFX_FontMgr::AddCachedFace(const CFX_ByteString& face_name,
@@ -143,27 +143,25 @@ FXFT_Face CFX_FontMgr::AddCachedFace(const CFX_ByteString& face_name,
int face_index) {
CTTFontDesc* pFontDesc = new CTTFontDesc;
pFontDesc->m_Type = 1;
- pFontDesc->m_SingleFace.m_pFace = nullptr;
- pFontDesc->m_SingleFace.m_bBold = weight;
- pFontDesc->m_SingleFace.m_bItalic = bItalic;
+ pFontDesc->m_SingleFace = nullptr;
pFontDesc->m_pFontData = pData;
pFontDesc->m_RefCount = 1;
InitFTLibrary();
FXFT_Library library = m_FTLibrary;
int ret = FXFT_New_Memory_Face(library, pData, size, face_index,
- &pFontDesc->m_SingleFace.m_pFace);
+ &pFontDesc->m_SingleFace);
if (ret) {
delete pFontDesc;
return nullptr;
}
- ret = FXFT_Set_Pixel_Sizes(pFontDesc->m_SingleFace.m_pFace, 64, 64);
+ ret = FXFT_Set_Pixel_Sizes(pFontDesc->m_SingleFace, 64, 64);
if (ret) {
delete pFontDesc;
return nullptr;
}
m_FaceMap[KeyNameFromFace(face_name, weight, bItalic)] = pFontDesc;
- return pFontDesc->m_SingleFace.m_pFace;
+ return pFontDesc->m_SingleFace;
}
FXFT_Face CFX_FontMgr::GetCachedTTCFace(int ttc_size,
@@ -178,11 +176,11 @@ FXFT_Face CFX_FontMgr::GetCachedTTCFace(int ttc_size,
pFontData = pFontDesc->m_pFontData;
pFontDesc->m_RefCount++;
int face_index = GetTTCIndex(pFontDesc->m_pFontData, ttc_size, font_offset);
- if (!pFontDesc->m_TTCFace.m_pFaces[face_index]) {
- pFontDesc->m_TTCFace.m_pFaces[face_index] =
+ if (!pFontDesc->m_TTCFaces[face_index]) {
+ pFontDesc->m_TTCFaces[face_index] =
GetFixedFace(pFontDesc->m_pFontData, ttc_size, face_index);
}
- return pFontDesc->m_TTCFace.m_pFaces[face_index];
+ return pFontDesc->m_TTCFaces[face_index];
}
FXFT_Face CFX_FontMgr::AddCachedTTCFace(int ttc_size,
@@ -194,13 +192,13 @@ FXFT_Face CFX_FontMgr::AddCachedTTCFace(int ttc_size,
pFontDesc->m_Type = 2;
pFontDesc->m_pFontData = pData;
for (int i = 0; i < 16; i++)
- pFontDesc->m_TTCFace.m_pFaces[i] = nullptr;
+ pFontDesc->m_TTCFaces[i] = nullptr;
pFontDesc->m_RefCount++;
m_FaceMap[KeyNameFromSize(ttc_size, checksum)] = pFontDesc;
int face_index = GetTTCIndex(pFontDesc->m_pFontData, ttc_size, font_offset);
- pFontDesc->m_TTCFace.m_pFaces[face_index] =
+ pFontDesc->m_TTCFaces[face_index] =
GetFixedFace(pFontDesc->m_pFontData, ttc_size, face_index);
- return pFontDesc->m_TTCFace.m_pFaces[face_index];
+ return pFontDesc->m_TTCFaces[face_index];
}
FXFT_Face CFX_FontMgr::GetFixedFace(const uint8_t* pData,