| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
| 6 | |
| 7 #ifndef CORE_FXGE_INCLUDE_IFX_SYSTEMFONTINFO_H_ | |
| 8 #define CORE_FXGE_INCLUDE_IFX_SYSTEMFONTINFO_H_ | |
| 9 | |
| 10 #include "core/fxge/include/cfx_fontmapper.h" | |
| 11 #include "core/fxge/include/fx_font.h" | |
| 12 | |
| 13 const uint32_t kTableNAME = FXDWORD_GET_MSBFIRST("name"); | |
| 14 const uint32_t kTableTTCF = FXDWORD_GET_MSBFIRST("ttcf"); | |
| 15 | |
| 16 class IFX_SystemFontInfo { | |
| 17 public: | |
| 18 static std::unique_ptr<IFX_SystemFontInfo> CreateDefault( | |
| 19 const char** pUserPaths); | |
| 20 | |
| 21 virtual ~IFX_SystemFontInfo() {} | |
| 22 | |
| 23 virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper) = 0; | |
| 24 virtual void* MapFont(int weight, | |
| 25 FX_BOOL bItalic, | |
| 26 int charset, | |
| 27 int pitch_family, | |
| 28 const FX_CHAR* face, | |
| 29 int& iExact) = 0; | |
| 30 | |
| 31 #ifdef PDF_ENABLE_XFA | |
| 32 virtual void* MapFontByUnicode(uint32_t dwUnicode, | |
| 33 int weight, | |
| 34 FX_BOOL bItalic, | |
| 35 int pitch_family); | |
| 36 #endif // PDF_ENABLE_XFA | |
| 37 | |
| 38 virtual void* GetFont(const FX_CHAR* face) = 0; | |
| 39 virtual uint32_t GetFontData(void* hFont, | |
| 40 uint32_t table, | |
| 41 uint8_t* buffer, | |
| 42 uint32_t size) = 0; | |
| 43 virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) = 0; | |
| 44 virtual FX_BOOL GetFontCharset(void* hFont, int& charset) = 0; | |
| 45 virtual int GetFaceIndex(void* hFont); | |
| 46 virtual void DeleteFont(void* hFont) = 0; | |
| 47 }; | |
| 48 | |
| 49 #endif // CORE_FXGE_INCLUDE_IFX_SYSTEMFONTINFO_H_ | |
| OLD | NEW |