| 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 "../../../include/fxge/fx_ge.h" | 7 #include "../../../include/fxge/fx_ge.h" |
| 8 #include "../../../include/fxge/fx_freetype.h" | 8 #include "../../../include/fxge/fx_freetype.h" |
| 9 #include "text_int.h" | 9 #include "text_int.h" |
| 10 #define EM_ADJUST(em, a) (em == 0?(a): (a)*1000/em) | 10 #define EM_ADJUST(em, a) (em == 0?(a): (a)*1000/em) |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 m_pOwnedStream = NULL; | 21 m_pOwnedStream = NULL; |
| 22 m_pGsubData = NULL; | 22 m_pGsubData = NULL; |
| 23 m_pPlatformFont = NULL; | 23 m_pPlatformFont = NULL; |
| 24 m_pPlatformFontCollection = NULL; | 24 m_pPlatformFontCollection = NULL; |
| 25 m_pDwFont = NULL; | 25 m_pDwFont = NULL; |
| 26 m_hHandle = NULL; | 26 m_hHandle = NULL; |
| 27 m_bDwLoaded = FALSE; | 27 m_bDwLoaded = FALSE; |
| 28 } | 28 } |
| 29 CFX_Font::~CFX_Font() | 29 CFX_Font::~CFX_Font() |
| 30 { | 30 { |
| 31 if (m_pSubstFont) { | 31 delete m_pSubstFont; |
| 32 delete m_pSubstFont; | 32 m_pSubstFont = NULL; |
| 33 m_pSubstFont = NULL; | |
| 34 } | |
| 35 if (m_pFontDataAllocation) { | 33 if (m_pFontDataAllocation) { |
| 36 FX_Free(m_pFontDataAllocation); | 34 FX_Free(m_pFontDataAllocation); |
| 37 m_pFontDataAllocation = NULL; | 35 m_pFontDataAllocation = NULL; |
| 38 } | 36 } |
| 39 if (m_Face) { | 37 if (m_Face) { |
| 40 if (FXFT_Get_Face_External_Stream(m_Face)) { | 38 if (FXFT_Get_Face_External_Stream(m_Face)) { |
| 41 FXFT_Clear_Face_External_Stream(m_Face); | 39 FXFT_Clear_Face_External_Stream(m_Face); |
| 42 } | 40 } |
| 43 if(m_bEmbedded) { | 41 if(m_bEmbedded) { |
| 44 DeleteFace(); | 42 DeleteFace(); |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 break; | 426 break; |
| 429 } | 427 } |
| 430 } | 428 } |
| 431 } | 429 } |
| 432 return FXFT_Get_Char_Index(face, charcode); | 430 return FXFT_Get_Char_Index(face, charcode); |
| 433 } | 431 } |
| 434 IFX_FontEncoding* FXGE_CreateUnicodeEncoding(CFX_Font* pFont) | 432 IFX_FontEncoding* FXGE_CreateUnicodeEncoding(CFX_Font* pFont) |
| 435 { | 433 { |
| 436 return new CFX_UnicodeEncoding(pFont); | 434 return new CFX_UnicodeEncoding(pFont); |
| 437 } | 435 } |
| OLD | NEW |