| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "../../../include/fxge/fx_ge.h" | 9 #include "../../../include/fxge/fx_ge.h" |
| 10 #include "../../../include/fxge/fx_freetype.h" | 10 #include "../../../include/fxge/fx_freetype.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 CFX_FontMgr::CFX_FontMgr() | 64 CFX_FontMgr::CFX_FontMgr() |
| 65 { | 65 { |
| 66 m_pBuiltinMapper = new CFX_FontMapper; | 66 m_pBuiltinMapper = new CFX_FontMapper; |
| 67 m_pBuiltinMapper->m_pFontMgr = this; | 67 m_pBuiltinMapper->m_pFontMgr = this; |
| 68 m_pExtMapper = NULL; | 68 m_pExtMapper = NULL; |
| 69 m_FTLibrary = NULL; | 69 m_FTLibrary = NULL; |
| 70 FXSYS_memset(m_ExternalFonts, 0, sizeof m_ExternalFonts); | 70 FXSYS_memset(m_ExternalFonts, 0, sizeof m_ExternalFonts); |
| 71 } | 71 } |
| 72 CFX_FontMgr::~CFX_FontMgr() | 72 CFX_FontMgr::~CFX_FontMgr() |
| 73 { | 73 { |
| 74 if (m_pBuiltinMapper) { | 74 delete m_pBuiltinMapper; |
| 75 delete m_pBuiltinMapper; | |
| 76 } | |
| 77 FreeCache(); | 75 FreeCache(); |
| 78 if (m_FTLibrary) { | 76 if (m_FTLibrary) { |
| 79 FXFT_Done_FreeType(m_FTLibrary); | 77 FXFT_Done_FreeType(m_FTLibrary); |
| 80 } | 78 } |
| 81 } | 79 } |
| 82 void CFX_FontMgr::InitFTLibrary() | 80 void CFX_FontMgr::InitFTLibrary() |
| 83 { | 81 { |
| 84 if (m_FTLibrary == NULL) { | 82 if (m_FTLibrary == NULL) { |
| 85 FXFT_Init_FreeType(&m_FTLibrary); | 83 FXFT_Init_FreeType(&m_FTLibrary); |
| 86 } | 84 } |
| (...skipping 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1518 return FALSE; | 1516 return FALSE; |
| 1519 } | 1517 } |
| 1520 CFontFaceInfo* pFont = (CFontFaceInfo*)hFont; | 1518 CFontFaceInfo* pFont = (CFontFaceInfo*)hFont; |
| 1521 name = pFont->m_FaceName; | 1519 name = pFont->m_FaceName; |
| 1522 return TRUE; | 1520 return TRUE; |
| 1523 } | 1521 } |
| 1524 FX_BOOL CFX_FolderFontInfo::GetFontCharset(void* hFont, int& charset) | 1522 FX_BOOL CFX_FolderFontInfo::GetFontCharset(void* hFont, int& charset) |
| 1525 { | 1523 { |
| 1526 return FALSE; | 1524 return FALSE; |
| 1527 } | 1525 } |
| OLD | NEW |