Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <cfx_fontmapper.h>
Public Types | |
enum | StandardFont : uint8_t { kCourier = 0 , kCourierBold , kCourierBoldOblique , kCourierOblique , kHelvetica , kHelveticaBold , kHelveticaBoldOblique , kHelveticaOblique , kTimes , kTimesBold , kTimesBoldOblique , kTimesOblique , kSymbol , kDingbats , kLast = kDingbats } |
Public Member Functions | |
CFX_FontMapper (CFX_FontMgr *mgr) | |
~CFX_FontMapper () | |
void | SetSystemFontInfo (std::unique_ptr< SystemFontInfoIface > pFontInfo) |
std::unique_ptr< SystemFontInfoIface > | TakeSystemFontInfo () |
void | AddInstalledFont (const ByteString &name, FX_Charset charset) |
void | LoadInstalledFonts () |
RetainPtr< CFX_Face > | FindSubstFont (const ByteString &face_name, bool is_truetype, uint32_t flags, int weight, int italic_angle, FX_CodePage code_page, CFX_SubstFont *subst_font) |
size_t | GetFaceSize () const |
ByteString | GetFaceName (size_t index) const |
bool | HasInstalledFont (ByteStringView name) const |
bool | HasLocalizedFont (ByteStringView name) const |
Static Public Member Functions | |
static absl::optional< StandardFont > | GetStandardFontName (ByteString *name) |
static bool | IsStandardFontName (const ByteString &name) |
static bool | IsSymbolicFont (StandardFont font) |
static bool | IsFixedFont (StandardFont font) |
static constexpr uint32_t | MakeTag (char c1, char c2, char c3, char c4) |
Static Public Attributes | |
static constexpr int | kNumStandardFonts = 14 |
Friends | |
class | TestFontMapper |
Definition at line 30 of file cfx_fontmapper.h.
enum CFX_FontMapper::StandardFont : uint8_t |
Definition at line 32 of file cfx_fontmapper.h.
|
explicit |
Definition at line 398 of file cfx_fontmapper.cpp.
Referenced by TestFontMapper::TestFontMapper(), TEST(), and TEST().
|
default |
void CFX_FontMapper::AddInstalledFont | ( | const ByteString & | name, |
FX_Charset | charset ) |
Definition at line 438 of file cfx_fontmapper.cpp.
References fxcrt::ByteString::begin(), and fxcrt::ByteString::end().
Referenced by FPDF_AddInstalledFont(), and TEST().
RetainPtr< CFX_Face > CFX_FontMapper::FindSubstFont | ( | const ByteString & | face_name, |
bool | is_truetype, | ||
uint32_t | flags, | ||
int | weight, | ||
int | italic_angle, | ||
FX_CodePage | code_page, | ||
CFX_SubstFont * | subst_font ) |
Definition at line 567 of file cfx_fontmapper.cpp.
References FontStyleIsForceBold(), FontStyleIsItalic(), FX_CharSetIsCJK(), fxcrt::ByteString::IsEmpty(), kANSI, kNumStandardFonts, kSymbol, kSymbol, CFX_SubstFont::m_bItalicCJK, CFX_SubstFont::m_bSubstCJK, CFX_SubstFont::m_Charset, CFX_SubstFont::m_WeightCJK, fxcrt::ByteString::operator!=(), fxcrt::ByteString::operator=(), fxcrt::ByteString::operator=(), fxcrt::ByteString::operator=(), and fxcrt::ByteString::operator==().
ByteString CFX_FontMapper::GetFaceName | ( | size_t | index | ) | const |
Definition at line 754 of file cfx_fontmapper.cpp.
size_t CFX_FontMapper::GetFaceSize | ( | ) | const |
Definition at line 750 of file cfx_fontmapper.cpp.
|
static |
Definition at line 882 of file cfx_fontmapper.cpp.
References fxcrt::ByteString::c_str(), and FXSYS_stricmp().
bool CFX_FontMapper::HasInstalledFont | ( | ByteStringView | name | ) | const |
Definition at line 759 of file cfx_fontmapper.cpp.
bool CFX_FontMapper::HasLocalizedFont | ( | ByteStringView | name | ) | const |
Definition at line 767 of file cfx_fontmapper.cpp.
|
static |
Definition at line 907 of file cfx_fontmapper.cpp.
References kCourier, kCourierBold, kCourierBoldOblique, and kCourierOblique.
|
static |
Definition at line 897 of file cfx_fontmapper.cpp.
Referenced by TEST().
|
static |
Definition at line 902 of file cfx_fontmapper.cpp.
void CFX_FontMapper::LoadInstalledFonts | ( | ) |
Definition at line 469 of file cfx_fontmapper.cpp.
|
inlinestaticconstexpr |
Definition at line 58 of file cfx_fontmapper.h.
Referenced by CFX_FolderFontInfo::ReportFace(), and TEST().
void CFX_FontMapper::SetSystemFontInfo | ( | std::unique_ptr< SystemFontInfoIface > | pFontInfo | ) |
Definition at line 402 of file cfx_fontmapper.cpp.
std::unique_ptr< SystemFontInfoIface > CFX_FontMapper::TakeSystemFontInfo | ( | ) |
Definition at line 411 of file cfx_fontmapper.cpp.
|
friend |
Definition at line 95 of file cfx_fontmapper.h.
|
staticconstexpr |
Definition at line 49 of file cfx_fontmapper.h.
Referenced by FindSubstFont().