Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
CFX_FontMapper Class Reference

#include <cfx_fontmapper.h>

Inheritance diagram for CFX_FontMapper:
Collaboration diagram for CFX_FontMapper:

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< SystemFontInfoIfaceTakeSystemFontInfo ()
void AddInstalledFont (const ByteString &name, FX_Charset charset)
void LoadInstalledFonts ()
RetainPtr< CFX_FaceFindSubstFont (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 std::optional< StandardFontGetStandardFontName (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

Detailed Description

Definition at line 31 of file cfx_fontmapper.h.

Member Enumeration Documentation

◆ StandardFont

Enumerator
kCourier 
kCourierBold 
kCourierBoldOblique 
kCourierOblique 
kHelvetica 
kHelveticaBold 
kHelveticaBoldOblique 
kHelveticaOblique 
kTimes 
kTimesBold 
kTimesBoldOblique 
kTimesOblique 
kSymbol 
kDingbats 
kLast 

Definition at line 33 of file cfx_fontmapper.h.

Constructor & Destructor Documentation

◆ CFX_FontMapper()

CFX_FontMapper::CFX_FontMapper ( CFX_FontMgr * mgr)
explicit

Definition at line 400 of file cfx_fontmapper.cpp.

Referenced by TestFontMapper::TestFontMapper(), TEST(), and TEST().

Here is the caller graph for this function:

◆ ~CFX_FontMapper()

CFX_FontMapper::~CFX_FontMapper ( )
default

Member Function Documentation

◆ AddInstalledFont()

void CFX_FontMapper::AddInstalledFont ( const ByteString & name,
FX_Charset charset )

Definition at line 439 of file cfx_fontmapper.cpp.

Referenced by FPDF_AddInstalledFont(), and TEST().

Here is the caller graph for this function:

◆ FindSubstFont()

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 )

◆ GetFaceName()

ByteString CFX_FontMapper::GetFaceName ( size_t index) const

Definition at line 759 of file cfx_fontmapper.cpp.

◆ GetFaceSize()

size_t CFX_FontMapper::GetFaceSize ( ) const

Definition at line 755 of file cfx_fontmapper.cpp.

◆ GetStandardFontName()

std::optional< CFX_FontMapper::StandardFont > CFX_FontMapper::GetStandardFontName ( ByteString * name)
static

Definition at line 886 of file cfx_fontmapper.cpp.

References FXSYS_stricmp().

Referenced by FindSubstFont().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HasInstalledFont()

bool CFX_FontMapper::HasInstalledFont ( ByteStringView name) const

Definition at line 764 of file cfx_fontmapper.cpp.

◆ HasLocalizedFont()

bool CFX_FontMapper::HasLocalizedFont ( ByteStringView name) const

Definition at line 772 of file cfx_fontmapper.cpp.

◆ IsFixedFont()

bool CFX_FontMapper::IsFixedFont ( StandardFont font)
static

Definition at line 912 of file cfx_fontmapper.cpp.

References kCourier, kCourierBold, kCourierBoldOblique, and kCourierOblique.

◆ IsStandardFontName()

bool CFX_FontMapper::IsStandardFontName ( const ByteString & name)
static

Definition at line 902 of file cfx_fontmapper.cpp.

Referenced by TEST().

Here is the caller graph for this function:

◆ IsSymbolicFont()

bool CFX_FontMapper::IsSymbolicFont ( StandardFont font)
static

Definition at line 907 of file cfx_fontmapper.cpp.

References kDingbats, and kSymbol.

◆ LoadInstalledFonts()

void CFX_FontMapper::LoadInstalledFonts ( )

Definition at line 470 of file cfx_fontmapper.cpp.

◆ MakeTag()

constexpr uint32_t CFX_FontMapper::MakeTag ( char c1,
char c2,
char c3,
char c4 )
inlinestaticconstexpr

Definition at line 59 of file cfx_fontmapper.h.

Referenced by CFX_FolderFontInfo::ReportFace(), and TEST().

Here is the caller graph for this function:

◆ SetSystemFontInfo()

void CFX_FontMapper::SetSystemFontInfo ( std::unique_ptr< SystemFontInfoIface > pFontInfo)

Definition at line 404 of file cfx_fontmapper.cpp.

◆ TakeSystemFontInfo()

std::unique_ptr< SystemFontInfoIface > CFX_FontMapper::TakeSystemFontInfo ( )

Definition at line 413 of file cfx_fontmapper.cpp.

◆ TestFontMapper

friend class TestFontMapper
friend

Definition at line 96 of file cfx_fontmapper.h.

Member Data Documentation

◆ kNumStandardFonts

int CFX_FontMapper::kNumStandardFonts = 14
staticconstexpr

Definition at line 50 of file cfx_fontmapper.h.

Referenced by FindSubstFont().


The documentation for this class was generated from the following files: