| 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 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1265 } | 1265 } |
| 1266 return FALSE; | 1266 return FALSE; |
| 1267 } | 1267 } |
| 1268 extern "C" { | 1268 extern "C" { |
| 1269 unsigned long _FTStreamRead(FXFT_Stream stream, | 1269 unsigned long _FTStreamRead(FXFT_Stream stream, |
| 1270 unsigned long offset, | 1270 unsigned long offset, |
| 1271 unsigned char* buffer, | 1271 unsigned char* buffer, |
| 1272 unsigned long count); | 1272 unsigned long count); |
| 1273 void _FTStreamClose(FXFT_Stream stream); | 1273 void _FTStreamClose(FXFT_Stream stream); |
| 1274 }; | 1274 }; |
| 1275 CFontFileFaceInfo::CFontFileFaceInfo() { | |
| 1276 m_pFile = NULL; | |
| 1277 m_Face = NULL; | |
| 1278 m_Charsets = 0; | |
| 1279 m_FileSize = 0; | |
| 1280 m_FontOffset = 0; | |
| 1281 m_Weight = 0; | |
| 1282 m_bItalic = FALSE; | |
| 1283 m_PitchFamily = 0; | |
| 1284 } | |
| 1285 CFontFileFaceInfo::~CFontFileFaceInfo() { | |
| 1286 if (m_Face) { | |
| 1287 FXFT_Done_Face(m_Face); | |
| 1288 } | |
| 1289 m_Face = NULL; | |
| 1290 } | |
| 1291 #if _FX_OS_ == _FX_ANDROID_ | 1275 #if _FX_OS_ == _FX_ANDROID_ |
| 1292 IFX_SystemFontInfo* IFX_SystemFontInfo::CreateDefault(const char** pUnused) { | 1276 IFX_SystemFontInfo* IFX_SystemFontInfo::CreateDefault(const char** pUnused) { |
| 1293 return NULL; | 1277 return NULL; |
| 1294 } | 1278 } |
| 1295 #endif | 1279 #endif |
| 1296 CFX_FolderFontInfo::CFX_FolderFontInfo() {} | 1280 CFX_FolderFontInfo::CFX_FolderFontInfo() {} |
| 1297 CFX_FolderFontInfo::~CFX_FolderFontInfo() { | 1281 CFX_FolderFontInfo::~CFX_FolderFontInfo() { |
| 1298 for (const auto& pair : m_FontList) { | 1282 for (const auto& pair : m_FontList) { |
| 1299 delete pair.second; | 1283 delete pair.second; |
| 1300 } | 1284 } |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1627 int PDF_GetStandardFontName(CFX_ByteString* name) { | 1611 int PDF_GetStandardFontName(CFX_ByteString* name) { |
| 1628 AltFontName* found = static_cast<AltFontName*>( | 1612 AltFontName* found = static_cast<AltFontName*>( |
| 1629 FXSYS_bsearch(name->c_str(), g_AltFontNames, FX_ArraySize(g_AltFontNames), | 1613 FXSYS_bsearch(name->c_str(), g_AltFontNames, FX_ArraySize(g_AltFontNames), |
| 1630 sizeof(AltFontName), compareString)); | 1614 sizeof(AltFontName), compareString)); |
| 1631 if (!found) | 1615 if (!found) |
| 1632 return -1; | 1616 return -1; |
| 1633 | 1617 |
| 1634 *name = g_Base14FontNames[found->m_Index]; | 1618 *name = g_Base14FontNames[found->m_Index]; |
| 1635 return found->m_Index; | 1619 return found->m_Index; |
| 1636 } | 1620 } |
| OLD | NEW |