| 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/fxge/include/cfx_fontmapper.h" | 7 #include "core/fxge/include/cfx_fontmapper.h" |
| 8 #include "core/fxge/include/ifx_systemfontinfo.h" | 8 #include "core/fxge/include/ifx_systemfontinfo.h" |
| 9 | 9 |
| 10 CFX_SubstFont::CFX_SubstFont() { | 10 CFX_SubstFont::CFX_SubstFont() { |
| 11 m_ExtHandle = nullptr; | |
| 12 m_Charset = FXFONT_ANSI_CHARSET; | 11 m_Charset = FXFONT_ANSI_CHARSET; |
| 13 m_SubstFlags = 0; | 12 m_SubstFlags = 0; |
| 14 m_Weight = 0; | 13 m_Weight = 0; |
| 15 m_ItalicAngle = 0; | 14 m_ItalicAngle = 0; |
| 16 m_bSubstCJK = false; | 15 m_bSubstCJK = false; |
| 17 m_WeightCJK = 0; | 16 m_WeightCJK = 0; |
| 18 m_bItalicCJK = false; | 17 m_bItalicCJK = false; |
| 19 } | 18 } |
| 20 | 19 |
| 21 CTTFontDesc::~CTTFontDesc() { | 20 CTTFontDesc::~CTTFontDesc() { |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 FX_BOOL bItalic, | 101 FX_BOOL bItalic, |
| 103 int pitch_family) { | 102 int pitch_family) { |
| 104 return nullptr; | 103 return nullptr; |
| 105 } | 104 } |
| 106 #endif // PDF_ENABLE_XFA | 105 #endif // PDF_ENABLE_XFA |
| 107 | 106 |
| 108 int IFX_SystemFontInfo::GetFaceIndex(void* hFont) { | 107 int IFX_SystemFontInfo::GetFaceIndex(void* hFont) { |
| 109 return 0; | 108 return 0; |
| 110 } | 109 } |
| 111 | 110 |
| 112 void* IFX_SystemFontInfo::RetainFont(void* hFont) { | |
| 113 return nullptr; | |
| 114 } | |
| 115 | |
| 116 extern "C" { | 111 extern "C" { |
| 117 unsigned long _FTStreamRead(FXFT_Stream stream, | 112 unsigned long _FTStreamRead(FXFT_Stream stream, |
| 118 unsigned long offset, | 113 unsigned long offset, |
| 119 unsigned char* buffer, | 114 unsigned char* buffer, |
| 120 unsigned long count); | 115 unsigned long count); |
| 121 void _FTStreamClose(FXFT_Stream stream); | 116 void _FTStreamClose(FXFT_Stream stream); |
| 122 }; | 117 }; |
| 123 | 118 |
| 124 #if _FX_OS_ == _FX_ANDROID_ | 119 #if _FX_OS_ == _FX_ANDROID_ |
| 125 std::unique_ptr<IFX_SystemFontInfo> IFX_SystemFontInfo::CreateDefault( | 120 std::unique_ptr<IFX_SystemFontInfo> IFX_SystemFontInfo::CreateDefault( |
| 126 const char** pUnused) { | 121 const char** pUnused) { |
| 127 return nullptr; | 122 return nullptr; |
| 128 } | 123 } |
| 129 #endif | 124 #endif |
| 130 | 125 |
| 131 CFX_FontFaceInfo::CFX_FontFaceInfo(CFX_ByteString filePath, | 126 CFX_FontFaceInfo::CFX_FontFaceInfo(CFX_ByteString filePath, |
| 132 CFX_ByteString faceName, | 127 CFX_ByteString faceName, |
| 133 CFX_ByteString fontTables, | 128 CFX_ByteString fontTables, |
| 134 uint32_t fontOffset, | 129 uint32_t fontOffset, |
| 135 uint32_t fileSize) | 130 uint32_t fileSize) |
| 136 : m_FilePath(filePath), | 131 : m_FilePath(filePath), |
| 137 m_FaceName(faceName), | 132 m_FaceName(faceName), |
| 138 m_FontTables(fontTables), | 133 m_FontTables(fontTables), |
| 139 m_FontOffset(fontOffset), | 134 m_FontOffset(fontOffset), |
| 140 m_FileSize(fileSize), | 135 m_FileSize(fileSize), |
| 141 m_Styles(0), | 136 m_Styles(0), |
| 142 m_Charsets(0) {} | 137 m_Charsets(0) {} |
| OLD | NEW |