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
 
int GetAdjustedAscender () const
 
int GetAdjustedDescender () const
 
pdfium::span< uint8_t > GetData () const
 
size_t GetSfntTable (uint32_t table, pdfium::span< uint8_t > buffer)
 
absl::optional< std::array< uint32_t, 4 > > GetOs2UnicodeRange ()
 
absl::optional< std::array< uint32_t, 2 > > GetOs2CodePageRange ()
 
absl::optional< std::array< uint8_t, 2 > > GetOs2Panose ()
 
int GetGlyphCount () 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)
 
int GetCharIndex (uint32_t code)
 
int GetNameIndex (const char *name)
 
std::vector< CharCodeAndIndexGetCharCodesAndIndices (char32_t max_char)
 
CharMap GetCurrentCharMap () const
 
absl::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)
 
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

◆ GetAdjustedAscender()

int CFX_Face::GetAdjustedAscender ( ) const

Definition at line 362 of file cfx_face.cpp.

References GetAscender(), and GetUnitsPerEm().

+ Here is the call graph for this function:

◆ GetAdjustedDescender()

int CFX_Face::GetAdjustedDescender ( ) const

Definition at line 369 of file cfx_face.cpp.

References GetDescender(), and GetUnitsPerEm().

+ Here is the call graph for this function:

◆ GetAscender()

int16_t CFX_Face::GetAscender ( ) const

Definition at line 354 of file cfx_face.cpp.

References GetRec().

Referenced by GetAdjustedAscender().

+ 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 343 of file cfx_face.cpp.

References GetRec().

+ Here is the call graph for this function:

◆ GetCharCodesAndIndices()

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

Definition at line 656 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 647 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 702 of file cfx_face.cpp.

◆ GetCharMapEncodingByIndex()

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

Definition at line 697 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 692 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 687 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 676 of file cfx_face.cpp.

References GetRec().

+ Here is the call graph for this function:

◆ GetCurrentCharMapEncoding()

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

Definition at line 680 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 382 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 358 of file cfx_face.cpp.

References GetRec().

Referenced by GetAdjustedDescender().

+ 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 335 of file cfx_face.cpp.

References GetRec().

+ Here is the call graph for this function:

◆ GetGlyphCount()

int CFX_Face::GetGlyphCount ( ) const

Definition at line 432 of file cfx_face.cpp.

References 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 623 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 651 of file cfx_face.cpp.

References GetRec().

+ Here is the call graph for this function:

◆ GetOs2CodePageRange()

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

Definition at line 415 of file cfx_face.cpp.

◆ GetOs2Panose()

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

Definition at line 424 of file cfx_face.cpp.

◆ GetOs2UnicodeRange()

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

Definition at line 404 of file cfx_face.cpp.

◆ GetRec() [1/2]

FXFT_FaceRec * CFX_Face::GetRec ( )
inline

Definition at line 121 of file cfx_face.h.

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

+ Here is the caller graph for this function:

◆ GetRec() [2/2]

const FXFT_FaceRec * CFX_Face::GetRec ( ) const
inline

Definition at line 122 of file cfx_face.h.

Referenced by GetAscender(), GetBBox(), GetCharMapEncodingByIndex(), GetCharMapEncodingIdByIndex(), GetCharMapPlatformIdByIndex(), GetCurrentCharMap(), GetCurrentCharMapEncoding(), GetData(), GetDescender(), GetFamilyName(), 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 386 of file cfx_face.cpp.

References GetRec().

+ Here is the call graph for this function:

◆ GetStyleName()

ByteString CFX_Face::GetStyleName ( ) const

Definition at line 339 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 350 of file cfx_face.cpp.

References GetRec().

Referenced by GetAdjustedAscender(), GetAdjustedDescender(), 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 301 of file cfx_face.cpp.

◆ IsBold()

bool CFX_Face::IsBold ( ) const

Definition at line 331 of file cfx_face.cpp.

◆ IsFixedWidth()

bool CFX_Face::IsFixedWidth ( ) const

Definition at line 313 of file cfx_face.cpp.

◆ IsItalic()

bool CFX_Face::IsItalic ( ) const

Definition at line 327 of file cfx_face.cpp.

◆ IsTricky()

bool CFX_Face::IsTricky ( ) const

Definition at line 309 of file cfx_face.cpp.

Referenced by LoadGlyphPath().

+ Here is the caller graph for this function:

◆ IsTtOt()

bool CFX_Face::IsTtOt ( ) const

Definition at line 305 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 557 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 275 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 290 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 436 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 717 of file cfx_face.cpp.

◆ SetCharMap()

void CFX_Face::SetCharMap ( CharMap map)

Definition at line 708 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 712 of file cfx_face.cpp.

References GetRec(), and SetCharMap().

+ Here is the call graph for this function:

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