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_Font Class Reference

#include <cfx_font.h>

Collaboration diagram for CFX_Font:

Classes

struct  CharsetFontMap

Public Types

enum class  FontType { kUnknown , kCIDTrueType }

Public Member Functions

 CFX_Font ()
 ~CFX_Font ()
void LoadSubst (const ByteString &face_name, bool bTrueType, uint32_t flags, int weight, int italic_angle, FX_CodePage code_page, bool bVertical)
bool LoadEmbedded (pdfium::span< const uint8_t > src_span, bool force_vertical, uint64_t object_tag)
RetainPtr< CFX_FaceGetFace () const
FXFT_FaceRecGetFaceRec () const
CFX_SubstFontGetSubstFont () const
int GetSubstFontItalicAngle () const
const CFX_GlyphBitmapLoadGlyphBitmap (uint32_t glyph_index, bool bFontStyle, const CFX_Matrix &matrix, int dest_width, int anti_alias, CFX_TextRenderOptions *text_options) const
const CFX_PathLoadGlyphPath (uint32_t glyph_index, int dest_width) const
int GetGlyphWidth (uint32_t glyph_index) const
int GetGlyphWidth (uint32_t glyph_index, int dest_width, int weight) const
int GetAscent () const
int GetDescent () const
std::optional< FX_RECTGetGlyphBBox (uint32_t glyph_index)
bool IsItalic () const
bool IsBold () const
bool IsFixedWidth () const
bool IsVertical () const
ByteString GetPsName () const
ByteString GetFamilyName () const
ByteString GetBaseFontName () const
bool IsTTFont () const
std::optional< FX_RECTGetRawBBox () const
std::optional< FX_RECTGetBBox () const
FontType GetFontType () const
void SetFontType (FontType type)
uint64_t GetObjectTag () const
pdfium::raw_span< uint8_t > GetFontSpan () const
std::unique_ptr< CFX_PathLoadGlyphPathImpl (uint32_t glyph_index, int dest_width) const
int GetGlyphWidthImpl (uint32_t glyph_index, int dest_width, int weight) const

Static Public Member Functions

static pdfium::span< const CharsetFontMapGetDefaultTTFMapSpan ()
static ByteString GetDefaultFontNameByCharset (FX_Charset nCharset)
static FX_Charset GetCharSetFromUnicode (uint16_t word)

Static Public Attributes

static const char kUntitledFontName [] = "Untitled"
static const char kDefaultAnsiFontName [] = "Helvetica"
static const char kUniversalDefaultFontName [] = "Arial Unicode MS"

Detailed Description

Definition at line 38 of file cfx_font.h.

Member Enumeration Documentation

◆ FontType

enum class CFX_Font::FontType
strong
Enumerator
kUnknown 
kCIDTrueType 

Definition at line 46 of file cfx_font.h.

Constructor & Destructor Documentation

◆ CFX_Font()

CFX_Font::CFX_Font ( )
default

◆ ~CFX_Font()

CFX_Font::~CFX_Font ( )

Definition at line 224 of file cfx_font.cpp.

Member Function Documentation

◆ GetAscent()

int CFX_Font::GetAscent ( ) const

Definition at line 288 of file cfx_font.cpp.

◆ GetBaseFontName()

ByteString CFX_Font::GetBaseFontName ( ) const

Definition at line 399 of file cfx_font.cpp.

References fxcrt::ByteString::ByteString(), GetPsName(), IsTTFont(), kUntitledFontName, fxcrt::ByteString::operator!=(), fxcrt::operator+(), and fxcrt::ByteString::operator+=().

Here is the call graph for this function:

◆ GetBBox()

std::optional< FX_RECT > CFX_Font::GetBBox ( ) const

Definition at line 423 of file cfx_font.cpp.

References FX_RECT::bottom, FX_RECT::left, FX_RECT::right, and FX_RECT::top.

◆ GetCharSetFromUnicode()

FX_Charset CFX_Font::GetCharSetFromUnicode ( uint16_t word)
static

Definition at line 126 of file cfx_font.cpp.

References kANSI, kChineseSimplified, kHangul, kMSWin_Arabic, kMSWin_Cyrillic, kMSWin_EasternEuropean, kMSWin_Greek, kMSWin_Hebrew, kMSWin_Vietnamese, kShiftJIS, and kThai.

Referenced by CPDF_BAFontMap::CharSetFromUnicode().

Here is the caller graph for this function:

◆ GetDefaultFontNameByCharset()

ByteString CFX_Font::GetDefaultFontNameByCharset ( FX_Charset nCharset)
static

Definition at line 116 of file cfx_font.cpp.

References kUniversalDefaultFontName.

◆ GetDefaultTTFMapSpan()

pdfium::span< const CFX_Font::CharsetFontMap > CFX_Font::GetDefaultTTFMapSpan ( )
static

Definition at line 110 of file cfx_font.cpp.

◆ GetDescent()

int CFX_Font::GetDescent ( ) const

Definition at line 295 of file cfx_font.cpp.

Referenced by CBC_OneDimWriter::CalcTextInfo().

Here is the caller graph for this function:

◆ GetFace()

RetainPtr< CFX_Face > CFX_Font::GetFace ( ) const
inline

Definition at line 75 of file cfx_font.h.

◆ GetFaceRec()

FXFT_FaceRec * CFX_Font::GetFaceRec ( ) const
inline

Definition at line 76 of file cfx_font.h.

Referenced by CFX_RenderDevice::DrawNormalText().

Here is the caller graph for this function:

◆ GetFamilyName()

ByteString CFX_Font::GetFamilyName ( ) const

Definition at line 386 of file cfx_font.cpp.

References fxcrt::ByteString::ByteString().

Referenced by FPDFFont_GetFamilyName().

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

◆ GetFontSpan()

pdfium::raw_span< uint8_t > CFX_Font::GetFontSpan ( ) const
inline

Definition at line 123 of file cfx_font.h.

◆ GetFontType()

FontType CFX_Font::GetFontType ( ) const
inline

Definition at line 120 of file cfx_font.h.

◆ GetGlyphBBox()

std::optional< FX_RECT > CFX_Font::GetGlyphBBox ( uint32_t glyph_index)

Definition at line 302 of file cfx_font.cpp.

◆ GetGlyphWidth() [1/2]

int CFX_Font::GetGlyphWidth ( uint32_t glyph_index) const

Definition at line 251 of file cfx_font.cpp.

References GetGlyphWidth().

Referenced by CBC_OneDimWriter::CalcTextInfo(), and GetCharPosList().

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

◆ GetGlyphWidth() [2/2]

int CFX_Font::GetGlyphWidth ( uint32_t glyph_index,
int dest_width,
int weight ) const

Definition at line 255 of file cfx_font.cpp.

Referenced by GetGlyphWidth().

Here is the caller graph for this function:

◆ GetGlyphWidthImpl()

int CFX_Font::GetGlyphWidthImpl ( uint32_t glyph_index,
int dest_width,
int weight ) const

Definition at line 262 of file cfx_font.cpp.

◆ GetObjectTag()

uint64_t CFX_Font::GetObjectTag ( ) const
inline

Definition at line 122 of file cfx_font.h.

Referenced by CFX_PSFontTracker::AddFontObject(), and CFX_PSFontTracker::SeenFontObject().

Here is the caller graph for this function:

◆ GetPsName()

ByteString CFX_Font::GetPsName ( ) const

Definition at line 376 of file cfx_font.cpp.

References fxcrt::ByteString::ByteString(), kUntitledFontName, and fxcrt::ByteString::operator=().

Referenced by GetBaseFontName().

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

◆ GetRawBBox()

std::optional< FX_RECT > CFX_Font::GetRawBBox ( ) const

Definition at line 417 of file cfx_font.cpp.

◆ GetSubstFont()

CFX_SubstFont * CFX_Font::GetSubstFont ( ) const
inline

Definition at line 79 of file cfx_font.h.

Referenced by GetSubstFontItalicAngle(), CFX_GlyphCache::LoadGlyphPath(), and CFX_Face::RenderGlyph().

Here is the caller graph for this function:

◆ GetSubstFontItalicAngle()

int CFX_Font::GetSubstFontItalicAngle ( ) const

Definition at line 178 of file cfx_font.cpp.

References GetSubstFont(), and CFX_SubstFont::m_ItalicAngle.

Referenced by CFX_SkiaDeviceDriver::DrawDeviceText().

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

◆ IsBold()

bool CFX_Font::IsBold ( ) const

Definition at line 361 of file cfx_font.cpp.

◆ IsFixedWidth()

bool CFX_Font::IsFixedWidth ( ) const

Definition at line 365 of file cfx_font.cpp.

◆ IsItalic()

bool CFX_Font::IsItalic ( ) const

Definition at line 349 of file cfx_font.cpp.

References fxcrt::ByteString::MakeLower().

Here is the call graph for this function:

◆ IsTTFont()

bool CFX_Font::IsTTFont ( ) const

Definition at line 284 of file cfx_font.cpp.

Referenced by GetBaseFontName().

Here is the caller graph for this function:

◆ IsVertical()

bool CFX_Font::IsVertical ( ) const
inline

Definition at line 108 of file cfx_font.h.

Referenced by CFX_SkiaDeviceDriver::DrawDeviceText(), CFX_GlyphCache::LoadGlyphPath(), and CFX_Face::RenderGlyph().

Here is the caller graph for this function:

◆ LoadEmbedded()

bool CFX_Font::LoadEmbedded ( pdfium::span< const uint8_t > src_span,
bool force_vertical,
uint64_t object_tag )

Definition at line 272 of file cfx_font.cpp.

◆ LoadGlyphBitmap()

const CFX_GlyphBitmap * CFX_Font::LoadGlyphBitmap ( uint32_t glyph_index,
bool bFontStyle,
const CFX_Matrix & matrix,
int dest_width,
int anti_alias,
CFX_TextRenderOptions * text_options ) const

Definition at line 458 of file cfx_font.cpp.

Referenced by CFX_RenderDevice::DrawNormalText().

Here is the caller graph for this function:

◆ LoadGlyphPath()

const CFX_Path * CFX_Font::LoadGlyphPath ( uint32_t glyph_index,
int dest_width ) const

Definition at line 470 of file cfx_font.cpp.

Referenced by FPDFFont_GetGlyphPath().

Here is the caller graph for this function:

◆ LoadGlyphPathImpl()

std::unique_ptr< CFX_Path > CFX_Font::LoadGlyphPathImpl ( uint32_t glyph_index,
int dest_width ) const

Definition at line 449 of file cfx_font.cpp.

◆ LoadSubst()

void CFX_Font::LoadSubst ( const ByteString & face_name,
bool bTrueType,
uint32_t flags,
int weight,
int italic_angle,
FX_CodePage code_page,
bool bVertical )

Definition at line 233 of file cfx_font.cpp.

◆ SetFontType()

void CFX_Font::SetFontType ( FontType type)
inline

Definition at line 121 of file cfx_font.h.

Member Data Documentation

◆ kDefaultAnsiFontName

const char CFX_Font::kDefaultAnsiFontName = "Helvetica"
static

Definition at line 54 of file cfx_font.h.

Referenced by CPDF_BAFontMap::CPDF_BAFontMap().

◆ kUniversalDefaultFontName

const char CFX_Font::kUniversalDefaultFontName = "Arial Unicode MS"
static

Definition at line 55 of file cfx_font.h.

Referenced by GetDefaultFontNameByCharset(), and CPDF_BAFontMap::GetWordFontIndex().

◆ kUntitledFontName

const char CFX_Font::kUntitledFontName = "Untitled"
static

Definition at line 52 of file cfx_font.h.

Referenced by GetBaseFontName(), and GetPsName().


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