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_Face Class Referencefinal

#include <cfx_face.h>

Inheritance diagram for CFX_Face:
Collaboration diagram for CFX_Face:

Classes

struct  CharCodeAndIndex

Public Types

using CharMap = void*

Public Member Functions

bool HasGlyphNames () const
bool IsTtOt () const
bool IsTricky () const
bool IsFixedWidth () const
bool IsItalic () const
bool IsBold () const
ByteString GetFamilyName () const
ByteString GetStyleName () const
FX_RECT GetBBox () const
uint16_t GetUnitsPerEm () const
int16_t GetAscender () const
int16_t GetDescender () const
pdfium::span< uint8_t > GetData () const
size_t GetSfntTable (uint32_t table, pdfium::span< uint8_t > buffer)
std::optional< std::array< uint32_t, 4 > > GetOs2UnicodeRange ()
std::optional< std::array< uint32_t, 2 > > GetOs2CodePageRange ()
std::optional< std::array< uint8_t, 2 > > GetOs2Panose ()
int GetGlyphCount () const
FX_RECT GetGlyphBBox () const
std::unique_ptr< CFX_GlyphBitmapRenderGlyph (const CFX_Font *pFont, uint32_t glyph_index, bool bFontStyle, const CFX_Matrix &matrix, int dest_width, int anti_alias)
std::unique_ptr< CFX_PathLoadGlyphPath (uint32_t glyph_index, int dest_width, bool is_vertical, const CFX_SubstFont *subst_font)
int GetGlyphWidth (uint32_t glyph_index, int dest_width, int weight, const CFX_SubstFont *subst_font)
ByteString GetGlyphName (uint32_t glyph_index)
int GetCharIndex (uint32_t code)
int GetNameIndex (const char *name)
FX_RECT GetCharBBox (uint32_t code, int glyph_index)
std::vector< CharCodeAndIndexGetCharCodesAndIndices (char32_t max_char)
CharMap GetCurrentCharMap () const
std::optional< fxge::FontEncodingGetCurrentCharMapEncoding () const
int GetCharMapPlatformIdByIndex (size_t index) const
int GetCharMapEncodingIdByIndex (size_t index) const
fxge::FontEncoding GetCharMapEncodingByIndex (size_t index) const
size_t GetCharMapCount () const
void SetCharMap (CharMap map)
void SetCharMapByIndex (size_t index)
bool SelectCharMap (fxge::FontEncoding encoding)
bool SetPixelSize (uint32_t width, uint32_t height)
FXFT_FaceRecGetRec ()
const FXFT_FaceRecGetRec () const
Public Member Functions inherited from fxcrt::Retainable
 Retainable ()=default
bool HasOneRef () const
Public Member Functions inherited from fxcrt::Observable
 Observable ()
 Observable (const Observable &that)=delete
Observableoperator= (const Observable &that)=delete
 ~Observable ()
void AddObserver (ObserverIface *pObserver)
void RemoveObserver (ObserverIface *pObserver)
void NotifyObservers ()

Static Public Member Functions

static RetainPtr< CFX_FaceNew (FT_Library library, RetainPtr< Retainable > pDesc, pdfium::span< const FT_Byte > data, FT_Long face_index)
static RetainPtr< CFX_FaceOpen (FT_Library library, const FT_Open_Args *args, FT_Long face_index)

Private Member Functions

 ~CFX_Face () override

Additional Inherited Members

Protected Member Functions inherited from fxcrt::Retainable
virtual ~Retainable ()=default
Protected Member Functions inherited from fxcrt::Observable
size_t ActiveObserversForTesting () const

Detailed Description

Definition at line 32 of file cfx_face.h.

Member Typedef Documentation

◆ CharMap

Definition at line 34 of file cfx_face.h.

Member Function Documentation

◆ ~CFX_Face()

CFX_Face::~CFX_Face ( )
overrideprivatedefault

◆ GetAscender()

int16_t CFX_Face::GetAscender ( ) const

Definition at line 370 of file cfx_face.cpp.

References GetRec().

Referenced by GetCharBBox().

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

◆ GetBBox()

FX_RECT CFX_Face::GetBBox ( ) const

Definition at line 359 of file cfx_face.cpp.

References GetRec().

Here is the call graph for this function:

◆ GetCharBBox()

FX_RECT CFX_Face::GetCharBBox ( uint32_t code,
int glyph_index )

Definition at line 672 of file cfx_face.cpp.

References FX_RECT::FX_RECT(), FX_RECT::bottom, GetAscender(), GetDescender(), GetGlyphBBox(), GetRec(), IsTricky(), FX_RECT::operator=(), and FX_RECT::top.

Here is the call graph for this function:

◆ GetCharCodesAndIndices()

std::vector< CFX_Face::CharCodeAndIndex > CFX_Face::GetCharCodesAndIndices ( char32_t max_char)

Definition at line 727 of file cfx_face.cpp.

References CFX_Face::CharCodeAndIndex::char_code, GetRec(), and CFX_Face::CharCodeAndIndex::glyph_index.

Here is the call graph for this function:

◆ GetCharIndex()

int CFX_Face::GetCharIndex ( uint32_t code)

Definition at line 663 of file cfx_face.cpp.

References GetRec().

Here is the call graph for this function:

◆ GetCharMapCount()

size_t CFX_Face::GetCharMapCount ( ) const

Definition at line 776 of file cfx_face.cpp.

◆ GetCharMapEncodingByIndex()

fxge::FontEncoding CFX_Face::GetCharMapEncodingByIndex ( size_t index) const

Definition at line 770 of file cfx_face.cpp.

References GetRec().

Here is the call graph for this function:

◆ GetCharMapEncodingIdByIndex()

int CFX_Face::GetCharMapEncodingIdByIndex ( size_t index) const

Definition at line 764 of file cfx_face.cpp.

References GetRec().

Here is the call graph for this function:

◆ GetCharMapPlatformIdByIndex()

int CFX_Face::GetCharMapPlatformIdByIndex ( size_t index) const

Definition at line 758 of file cfx_face.cpp.

References GetRec().

Here is the call graph for this function:

◆ GetCurrentCharMap()

CFX_Face::CharMap CFX_Face::GetCurrentCharMap ( ) const

Definition at line 747 of file cfx_face.cpp.

References GetRec().

Here is the call graph for this function:

◆ GetCurrentCharMapEncoding()

std::optional< fxge::FontEncoding > CFX_Face::GetCurrentCharMapEncoding ( ) const

Definition at line 751 of file cfx_face.cpp.

References GetRec().

Here is the call graph for this function:

◆ GetData()

pdfium::span< uint8_t > CFX_Face::GetData ( ) const

Definition at line 384 of file cfx_face.cpp.

References GetRec().

Here is the call graph for this function:

◆ GetDescender()

int16_t CFX_Face::GetDescender ( ) const

Definition at line 374 of file cfx_face.cpp.

References GetRec().

Referenced by GetCharBBox().

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

◆ GetFamilyName()

ByteString CFX_Face::GetFamilyName ( ) const

Definition at line 351 of file cfx_face.cpp.

References GetRec().

Here is the call graph for this function:

◆ GetGlyphBBox()

FX_RECT CFX_Face::GetGlyphBBox ( ) const

Definition at line 716 of file cfx_face.cpp.

References GetRec(), and GetUnitsPerEm().

Referenced by GetCharBBox().

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

◆ GetGlyphCount()

int CFX_Face::GetGlyphCount ( ) const

Definition at line 436 of file cfx_face.cpp.

References GetRec().

Here is the call graph for this function:

◆ GetGlyphName()

ByteString CFX_Face::GetGlyphName ( uint32_t glyph_index)

Definition at line 656 of file cfx_face.cpp.

References fxcrt::ByteString::ByteString(), and GetRec().

Here is the call graph for this function:

◆ GetGlyphWidth()

int CFX_Face::GetGlyphWidth ( uint32_t glyph_index,
int dest_width,
int weight,
const CFX_SubstFont * subst_font )

Definition at line 632 of file cfx_face.cpp.

References GetRec(), GetUnitsPerEm(), and CFX_SubstFont::IsBuiltInGenericFont().

Here is the call graph for this function:

◆ GetNameIndex()

int CFX_Face::GetNameIndex ( const char * name)

Definition at line 667 of file cfx_face.cpp.

References GetRec().

Here is the call graph for this function:

◆ GetOs2CodePageRange()

std::optional< std::array< uint32_t, 2 > > CFX_Face::GetOs2CodePageRange ( )

Definition at line 418 of file cfx_face.cpp.

◆ GetOs2Panose()

std::optional< std::array< uint8_t, 2 > > CFX_Face::GetOs2Panose ( )

Definition at line 427 of file cfx_face.cpp.

◆ GetOs2UnicodeRange()

std::optional< std::array< uint32_t, 4 > > CFX_Face::GetOs2UnicodeRange ( )

Definition at line 407 of file cfx_face.cpp.

◆ GetRec() [1/2]

FXFT_FaceRec * CFX_Face::GetRec ( )
inline

Definition at line 126 of file cfx_face.h.

Referenced by GetCharBBox(), GetCharCodesAndIndices(), GetCharIndex(), GetGlyphName(), GetGlyphWidth(), GetNameIndex(), GetSfntTable(), LoadGlyphPath(), RenderGlyph(), SetCharMap(), SetCharMapByIndex(), and SetPixelSize().

Here is the caller graph for this function:

◆ GetRec() [2/2]

const FXFT_FaceRec * CFX_Face::GetRec ( ) const
inline

Definition at line 127 of file cfx_face.h.

Referenced by GetAscender(), GetBBox(), GetCharMapEncodingByIndex(), GetCharMapEncodingIdByIndex(), GetCharMapPlatformIdByIndex(), GetCurrentCharMap(), GetCurrentCharMapEncoding(), GetData(), GetDescender(), GetFamilyName(), GetGlyphBBox(), GetGlyphCount(), GetStyleName(), and GetUnitsPerEm().

Here is the caller graph for this function:

◆ GetSfntTable()

size_t CFX_Face::GetSfntTable ( uint32_t table,
pdfium::span< uint8_t > buffer )

Definition at line 390 of file cfx_face.cpp.

References GetRec().

Here is the call graph for this function:

◆ GetStyleName()

ByteString CFX_Face::GetStyleName ( ) const

Definition at line 355 of file cfx_face.cpp.

References GetRec().

Here is the call graph for this function:

◆ GetUnitsPerEm()

uint16_t CFX_Face::GetUnitsPerEm ( ) const

Definition at line 366 of file cfx_face.cpp.

References GetRec().

Referenced by GetGlyphBBox(), and GetGlyphWidth().

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

◆ HasGlyphNames()

bool CFX_Face::HasGlyphNames ( ) const

Definition at line 317 of file cfx_face.cpp.

◆ IsBold()

bool CFX_Face::IsBold ( ) const

Definition at line 347 of file cfx_face.cpp.

◆ IsFixedWidth()

bool CFX_Face::IsFixedWidth ( ) const

Definition at line 329 of file cfx_face.cpp.

◆ IsItalic()

bool CFX_Face::IsItalic ( ) const

Definition at line 343 of file cfx_face.cpp.

◆ IsTricky()

bool CFX_Face::IsTricky ( ) const

Definition at line 325 of file cfx_face.cpp.

Referenced by GetCharBBox(), and LoadGlyphPath().

Here is the caller graph for this function:

◆ IsTtOt()

bool CFX_Face::IsTtOt ( ) const

Definition at line 321 of file cfx_face.cpp.

Referenced by LoadGlyphPath(), and RenderGlyph().

Here is the caller graph for this function:

◆ LoadGlyphPath()

std::unique_ptr< CFX_Path > CFX_Face::LoadGlyphPath ( uint32_t glyph_index,
int dest_width,
bool is_vertical,
const CFX_SubstFont * subst_font )

Definition at line 566 of file cfx_face.cpp.

References GetRec(), CFX_SubstFont::IsBuiltInGenericFont(), IsTricky(), IsTtOt(), kShiftJIS, CFX_SubstFont::m_Charset, CFX_SubstFont::m_ItalicAngle, and CFX_SubstFont::m_Weight.

Here is the call graph for this function:

◆ New()

RetainPtr< CFX_Face > CFX_Face::New ( FT_Library library,
RetainPtr< Retainable > pDesc,
pdfium::span< const FT_Byte > data,
FT_Long face_index )
static

Definition at line 291 of file cfx_face.cpp.

◆ Open()

RetainPtr< CFX_Face > CFX_Face::Open ( FT_Library library,
const FT_Open_Args * args,
FT_Long face_index )
static

Definition at line 306 of file cfx_face.cpp.

◆ RenderGlyph()

std::unique_ptr< CFX_GlyphBitmap > CFX_Face::RenderGlyph ( const CFX_Font * pFont,
uint32_t glyph_index,
bool bFontStyle,
const CFX_Matrix & matrix,
int dest_width,
int anti_alias )

Definition at line 440 of file cfx_face.cpp.

References CFX_Matrix::a, CFX_Matrix::b, CFX_Matrix::c, CFX_Matrix::d, GetRec(), CFX_Font::GetSubstFont(), CFX_SubstFont::IsBuiltInGenericFont(), IsTtOt(), CFX_Font::IsVertical(), CFX_SubstFont::m_bItalicCJK, CFX_SubstFont::m_bSubstCJK, CFX_SubstFont::m_ItalicAngle, CFX_SubstFont::m_Weight, and CFX_SubstFont::m_WeightCJK.

Here is the call graph for this function:

◆ SelectCharMap()

bool CFX_Face::SelectCharMap ( fxge::FontEncoding encoding)

Definition at line 792 of file cfx_face.cpp.

◆ SetCharMap()

void CFX_Face::SetCharMap ( CharMap map)

Definition at line 782 of file cfx_face.cpp.

References GetRec().

Referenced by SetCharMapByIndex().

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

◆ SetCharMapByIndex()

void CFX_Face::SetCharMapByIndex ( size_t index)

Definition at line 786 of file cfx_face.cpp.

References GetRec(), and SetCharMap().

Here is the call graph for this function:

◆ SetPixelSize()

bool CFX_Face::SetPixelSize ( uint32_t width,
uint32_t height )

Definition at line 797 of file cfx_face.cpp.

References GetRec().

Here is the call graph for this function:

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