summaryrefslogtreecommitdiff
path: root/core/src/fxge/ge/fx_ge_fontmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fxge/ge/fx_ge_fontmap.cpp')
-rw-r--r--core/src/fxge/ge/fx_ge_fontmap.cpp20
1 files changed, 4 insertions, 16 deletions
diff --git a/core/src/fxge/ge/fx_ge_fontmap.cpp b/core/src/fxge/ge/fx_ge_fontmap.cpp
index 079c485b01..43b971ffc3 100644
--- a/core/src/fxge/ge/fx_ge_fontmap.cpp
+++ b/core/src/fxge/ge/fx_ge_fontmap.cpp
@@ -61,10 +61,7 @@ FX_BOOL CTTFontDesc::ReleaseFace(FXFT_Face face)
}
CFX_FontMgr::CFX_FontMgr()
{
- m_pBuiltinMapper = FX_NEW CFX_FontMapper;
- if (!m_pBuiltinMapper) {
- return;
- }
+ m_pBuiltinMapper = new CFX_FontMapper;
m_pBuiltinMapper->m_pFontMgr = this;
m_pExtMapper = NULL;
m_FTLibrary = NULL;
@@ -136,10 +133,7 @@ FXFT_Face CFX_FontMgr::GetCachedFace(const CFX_ByteString& face_name,
FXFT_Face CFX_FontMgr::AddCachedFace(const CFX_ByteString& face_name,
int weight, FX_BOOL bItalic, FX_LPBYTE pData, FX_DWORD size, int face_index)
{
- CTTFontDesc* pFontDesc = FX_NEW CTTFontDesc;
- if (!pFontDesc) {
- return NULL;
- }
+ CTTFontDesc* pFontDesc = new CTTFontDesc;
pFontDesc->m_Type = 1;
pFontDesc->m_SingleFace.m_pFace = NULL;
pFontDesc->m_SingleFace.m_bBold = weight;
@@ -337,10 +331,7 @@ FXFT_Face CFX_FontMgr::AddCachedTTCFace(int ttc_size, FX_DWORD checksum,
{
CFX_ByteString key;
key.Format("%d:%d", ttc_size, checksum);
- CTTFontDesc* pFontDesc = FX_NEW CTTFontDesc;
- if (!pFontDesc) {
- return NULL;
- }
+ CTTFontDesc* pFontDesc = new CTTFontDesc;
pFontDesc->m_Type = 2;
pFontDesc->m_pFontData = pData;
for (int i = 0; i < 16; i ++) {
@@ -1416,10 +1407,7 @@ void CFX_FolderFontInfo::ReportFace(CFX_ByteString& path, FXSYS_FILE* pFile, FX_
if (m_FontList.Lookup(facename, p)) {
return;
}
- CFontFaceInfo* pInfo = FX_NEW CFontFaceInfo;
- if (!pInfo) {
- return;
- }
+ CFontFaceInfo* pInfo = new CFontFaceInfo;
pInfo->m_FilePath = path;
pInfo->m_FaceName = facename;
pInfo->m_FontTables = tables;