| 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 "core/include/fxge/fx_freetype.h" | 7 #include "core/include/fxge/fx_freetype.h" |
| 8 #include "core/include/fxge/fx_ge.h" | 8 #include "core/include/fxge/fx_ge.h" |
| 9 #include "text_int.h" | 9 #include "text_int.h" |
| 10 | 10 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 m_dwSize = pFont->m_dwSize; | 94 m_dwSize = pFont->m_dwSize; |
| 95 m_pFontData = pFont->m_pFontData; | 95 m_pFontData = pFont->m_pFontData; |
| 96 m_pGsubData = pFont->m_pGsubData; | 96 m_pGsubData = pFont->m_pGsubData; |
| 97 m_pPlatformFont = pFont->m_pPlatformFont; | 97 m_pPlatformFont = pFont->m_pPlatformFont; |
| 98 m_pPlatformFontCollection = pFont->m_pPlatformFontCollection; | 98 m_pPlatformFontCollection = pFont->m_pPlatformFontCollection; |
| 99 m_pDwFont = pFont->m_pDwFont; | 99 m_pDwFont = pFont->m_pDwFont; |
| 100 m_hHandle = pFont->m_hHandle; | 100 m_hHandle = pFont->m_hHandle; |
| 101 m_bDwLoaded = pFont->m_bDwLoaded; | 101 m_bDwLoaded = pFont->m_bDwLoaded; |
| 102 m_pOwnedStream = pFont->m_pOwnedStream; | 102 m_pOwnedStream = pFont->m_pOwnedStream; |
| 103 return TRUE; | 103 return TRUE; |
| 104 } |
| 104 #endif // PDF_ENABLE_XFA | 105 #endif // PDF_ENABLE_XFA |
| 105 } | 106 |
| 106 CFX_Font::~CFX_Font() { | 107 CFX_Font::~CFX_Font() { |
| 107 delete m_pSubstFont; | 108 delete m_pSubstFont; |
| 108 m_pSubstFont = NULL; | 109 m_pSubstFont = NULL; |
| 109 #ifndef PDF_ENABLE_XFA | 110 #ifndef PDF_ENABLE_XFA |
| 110 FX_Free(m_pFontDataAllocation); | 111 FX_Free(m_pFontDataAllocation); |
| 111 m_pFontDataAllocation = NULL; | 112 m_pFontDataAllocation = NULL; |
| 112 #else | 113 #else |
| 113 if (m_bLogic) { | 114 if (m_bLogic) { |
| 114 m_OtfFontData.DetachBuffer(); | 115 m_OtfFontData.DetachBuffer(); |
| 115 return; | 116 return; |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 for (size_t i = 0; i < FX_ArraySize(g_EncodingID); ++i) { | 551 for (size_t i = 0; i < FX_ArraySize(g_EncodingID); ++i) { |
| 551 CFX_UnicodeEncodingEx* pFontEncoding = | 552 CFX_UnicodeEncodingEx* pFontEncoding = |
| 552 _FXFM_CreateFontEncoding(pFont, g_EncodingID[i]); | 553 _FXFM_CreateFontEncoding(pFont, g_EncodingID[i]); |
| 553 if (pFontEncoding) { | 554 if (pFontEncoding) { |
| 554 return pFontEncoding; | 555 return pFontEncoding; |
| 555 } | 556 } |
| 556 } | 557 } |
| 557 return NULL; | 558 return NULL; |
| 558 } | 559 } |
| 559 #endif // PDF_ENABLE_XFA | 560 #endif // PDF_ENABLE_XFA |
| OLD | NEW |