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 absl::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 30 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 32 of file cfx_fontmapper.h.

Constructor & Destructor Documentation

◆ CFX_FontMapper()

CFX_FontMapper::CFX_FontMapper ( CFX_FontMgr * mgr)
explicit

Definition at line 398 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 438 of file cfx_fontmapper.cpp.

References fxcrt::ByteString::begin(), and fxcrt::ByteString::end().

Referenced by FPDF_AddInstalledFont(), and TEST().

+ Here is the call graph for this function:
+ 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 754 of file cfx_fontmapper.cpp.

◆ GetFaceSize()

size_t CFX_FontMapper::GetFaceSize ( ) const

Definition at line 750 of file cfx_fontmapper.cpp.

◆ GetStandardFontName()

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

Definition at line 882 of file cfx_fontmapper.cpp.

References fxcrt::ByteString::c_str(), and FXSYS_stricmp().

+ Here is the call graph for this function:

◆ HasInstalledFont()

bool CFX_FontMapper::HasInstalledFont ( ByteStringView name) const

Definition at line 759 of file cfx_fontmapper.cpp.

◆ HasLocalizedFont()

bool CFX_FontMapper::HasLocalizedFont ( ByteStringView name) const

Definition at line 767 of file cfx_fontmapper.cpp.

◆ IsFixedFont()

bool CFX_FontMapper::IsFixedFont ( StandardFont font)
static

Definition at line 907 of file cfx_fontmapper.cpp.

References kCourier, kCourierBold, kCourierBoldOblique, and kCourierOblique.

◆ IsStandardFontName()

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

Definition at line 897 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 902 of file cfx_fontmapper.cpp.

References kDingbats, and kSymbol.

◆ LoadInstalledFonts()

void CFX_FontMapper::LoadInstalledFonts ( )

Definition at line 469 of file cfx_fontmapper.cpp.

◆ MakeTag()

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

Definition at line 58 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 402 of file cfx_fontmapper.cpp.

◆ TakeSystemFontInfo()

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

Definition at line 411 of file cfx_fontmapper.cpp.

Friends And Related Symbol Documentation

◆ TestFontMapper

friend class TestFontMapper
friend

Definition at line 95 of file cfx_fontmapper.h.

Member Data Documentation

◆ kNumStandardFonts

int CFX_FontMapper::kNumStandardFonts = 14
staticconstexpr

Definition at line 49 of file cfx_fontmapper.h.

Referenced by FindSubstFont().


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