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

#include <cpdf_cidfont.h>

+ Inheritance diagram for CPDF_CIDFont:
+ Collaboration diagram for CPDF_CIDFont:

Public Member Functions

 ~CPDF_CIDFont () override
 
bool IsCIDFont () const override
 
const CPDF_CIDFontAsCIDFont () const override
 
CPDF_CIDFontAsCIDFont () override
 
int GlyphFromCharCode (uint32_t charcode, bool *pVertGlyph) override
 
int GetCharWidthF (uint32_t charcode) override
 
FX_RECT GetCharBBox (uint32_t charcode) override
 
uint32_t GetNextChar (ByteStringView pString, size_t *pOffset) const override
 
size_t CountChar (ByteStringView pString) const override
 
int AppendChar (char *str, uint32_t charcode) const override
 
bool IsVertWriting () const override
 
bool IsUnicodeCompatible () const override
 
bool Load () override
 
WideString UnicodeFromCharCode (uint32_t charcode) const override
 
uint32_t CharCodeFromUnicode (wchar_t Unicode) const override
 
uint16_t CIDFromCharCode (uint32_t charcode) const
 
const uint8_t * GetCIDTransform (uint16_t cid) const
 
int16_t GetVertWidth (uint16_t cid) const
 
CFX_Point16 GetVertOrigin (uint16_t cid) const
 
int GetCharSize (uint32_t charcode) const
 
- Public Member Functions inherited from CPDF_Font
virtual bool IsType1Font () const
 
virtual bool IsTrueTypeFont () const
 
virtual bool IsType3Font () const
 
virtual const CPDF_Type1FontAsType1Font () const
 
virtual CPDF_Type1FontAsType1Font ()
 
virtual const CPDF_TrueTypeFontAsTrueTypeFont () const
 
virtual CPDF_TrueTypeFontAsTrueTypeFont ()
 
virtual const CPDF_Type3FontAsType3Font () const
 
virtual CPDF_Type3FontAsType3Font ()
 
virtual void WillBeDestroyed ()
 
virtual bool HasFontWidths () const
 
ByteString GetBaseFontName () const
 
absl::optional< FX_CharsetGetSubstFontCharset () const
 
bool IsEmbedded () const
 
RetainPtr< CPDF_DictionaryGetMutableFontDict ()
 
RetainPtr< const CPDF_DictionaryGetFontDict () const
 
uint32_t GetFontDictObjNum () const
 
bool FontDictIs (const CPDF_Dictionary *pThat) const
 
void ClearFontDict ()
 
bool IsStandardFont () const
 
bool HasFace () const
 
void AppendChar (ByteString *str, uint32_t charcode) const
 
const FX_RECTGetFontBBox () const
 
int GetTypeAscent () const
 
int GetTypeDescent () const
 
int GetStringWidth (ByteStringView pString)
 
uint32_t FallbackFontFromCharcode (uint32_t charcode)
 
int FallbackGlyphFromCharcode (int fallbackFont, uint32_t charcode)
 
int GetFontFlags () const
 
int GetItalicAngle () const
 
int GetFontWeight () const
 
CPDF_DocumentGetDocument () const
 
CFX_FontGetFont ()
 
const CFX_FontGetFont () const
 
CFX_FontGetFontFallback (int position)
 
const ByteStringGetResourceName () const
 
void SetResourceName (const ByteString &name)
 
- 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 float CIDTransformToFloat (uint8_t ch)
 
- Static Public Member Functions inherited from CPDF_Font
static RetainPtr< CPDF_FontCreate (CPDF_Document *pDoc, RetainPtr< CPDF_Dictionary > pFontDict, FormFactoryIface *pFactory)
 
static RetainPtr< CPDF_FontGetStockFont (CPDF_Document *pDoc, ByteStringView fontname)
 

Public Attributes

 CONSTRUCT_VIA_MAKE_RETAIN
 

Additional Inherited Members

- Static Public Attributes inherited from CPDF_Font
static constexpr uint32_t kInvalidCharCode = static_cast<uint32_t>(-1)
 
- Protected Member Functions inherited from CPDF_Font
 CPDF_Font (CPDF_Document *pDocument, RetainPtr< CPDF_Dictionary > pFontDict)
 
 ~CPDF_Font () override
 
void LoadUnicodeMap () const
 
void LoadFontDescriptor (const CPDF_Dictionary *pFontDesc)
 
void CheckFontMetrics ()
 
- Protected Member Functions inherited from fxcrt::Retainable
virtual ~Retainable ()=default
 
- Protected Member Functions inherited from fxcrt::Observable
size_t ActiveObserversForTesting () const
 
- Static Protected Member Functions inherited from CPDF_Font
static int TT2PDF (FT_Pos m, const RetainPtr< CFX_Face > &face)
 
static FX_RECT GetCharBBoxForFace (const RetainPtr< CFX_Face > &face)
 
static bool UseTTCharmapMSUnicode (const RetainPtr< CFX_Face > &face)
 
static bool UseTTCharmapMSSymbol (const RetainPtr< CFX_Face > &face)
 
static bool UseTTCharmapMacRoman (const RetainPtr< CFX_Face > &face)
 
static bool UseTTCharmap (const RetainPtr< CFX_Face > &face, int platform_id, int encoding_id)
 
static const char * GetAdobeCharName (FontEncoding base_encoding, const std::vector< ByteString > &charnames, uint32_t charcode)
 
- Protected Attributes inherited from CPDF_Font
UnownedPtr< CPDF_Document > const m_pDocument
 
ByteString m_ResourceName
 
CFX_Font m_Font
 
std::vector< std::unique_ptr< CFX_Font > > m_FontFallbacks
 
RetainPtr< CPDF_StreamAccm_pFontFile
 
RetainPtr< CPDF_Dictionarym_pFontDict
 
ByteString m_BaseFontName
 
std::unique_ptr< CPDF_ToUnicodeMapm_pToUnicodeMap
 
bool m_bToUnicodeLoaded = false
 
int m_Flags = 0
 
int m_StemV = 0
 
int m_Ascent = 0
 
int m_Descent = 0
 
int m_ItalicAngle = 0
 
FX_RECT m_FontBBox
 

Detailed Description

Definition at line 36 of file cpdf_cidfont.h.

Constructor & Destructor Documentation

◆ ~CPDF_CIDFont()

CPDF_CIDFont::~CPDF_CIDFont ( )
overridedefault

Member Function Documentation

◆ AppendChar()

int CPDF_CIDFont::AppendChar ( char * str,
uint32_t charcode ) const
overridevirtual

Reimplemented from CPDF_Font.

Definition at line 851 of file cpdf_cidfont.cpp.

◆ AsCIDFont() [1/2]

const CPDF_CIDFont * CPDF_CIDFont::AsCIDFont ( ) const
overridevirtual

Reimplemented from CPDF_Font.

Definition at line 295 of file cpdf_cidfont.cpp.

◆ AsCIDFont() [2/2]

CPDF_CIDFont * CPDF_CIDFont::AsCIDFont ( )
overridevirtual

Reimplemented from CPDF_Font.

Definition at line 299 of file cpdf_cidfont.cpp.

◆ CharCodeFromUnicode()

uint32_t CPDF_CIDFont::CharCodeFromUnicode ( wchar_t Unicode) const
overridevirtual

Reimplemented from CPDF_Font.

Definition at line 355 of file cpdf_cidfont.cpp.

References CPDF_Font::CharCodeFromUnicode().

+ Here is the call graph for this function:

◆ CIDFromCharCode()

uint16_t CPDF_CIDFont::CIDFromCharCode ( uint32_t charcode) const

Definition at line 303 of file cpdf_cidfont.cpp.

Referenced by FPDFFont_GetGlyphWidth(), GetCharBBox(), GetCharPosList(), CPDF_TextObject::GetCharWidth(), GetCharWidthF(), CPDF_TextObject::GetItemInfo(), and GlyphFromCharCode().

+ Here is the caller graph for this function:

◆ CIDTransformToFloat()

float CPDF_CIDFont::CIDTransformToFloat ( uint8_t ch)
static

Definition at line 871 of file cpdf_cidfont.cpp.

Referenced by GetCharBBox(), and GetCharPosList().

+ Here is the caller graph for this function:

◆ CountChar()

size_t CPDF_CIDFont::CountChar ( ByteStringView pString) const
overridevirtual

Reimplemented from CPDF_Font.

Definition at line 847 of file cpdf_cidfont.cpp.

◆ GetCharBBox()

FX_RECT CPDF_CIDFont::GetCharBBox ( uint32_t charcode)
overridevirtual

Implements CPDF_Font.

Definition at line 522 of file cpdf_cidfont.cpp.

References CFX_FloatRect::CFX_FloatRect(), CFX_Matrix::CFX_Matrix(), FX_RECT::FX_RECT(), FX_RECT::bottom, CIDFromCharCode(), CIDTransformToFloat(), CPDF_Font::GetCharBBoxForFace(), GetCIDTransform(), CFX_FloatRect::GetOuterRect(), GlyphFromCharCode(), FX_RECT::operator=(), FX_RECT::right, FX_RECT::top, and CFX_Matrix::TransformRect().

+ Here is the call graph for this function:

◆ GetCharSize()

int CPDF_CIDFont::GetCharSize ( uint32_t charcode) const

Definition at line 843 of file cpdf_cidfont.cpp.

◆ GetCharWidthF()

int CPDF_CIDFont::GetCharWidthF ( uint32_t charcode)
overridevirtual

Implements CPDF_Font.

Definition at line 590 of file cpdf_cidfont.cpp.

References CIDFromCharCode().

+ Here is the call graph for this function:

◆ GetCIDTransform()

const uint8_t * CPDF_CIDFont::GetCIDTransform ( uint16_t cid) const

Definition at line 893 of file cpdf_cidfont.cpp.

Referenced by GetCharBBox(), and GetCharPosList().

+ Here is the caller graph for this function:

◆ GetNextChar()

uint32_t CPDF_CIDFont::GetNextChar ( ByteStringView pString,
size_t * pOffset ) const
overridevirtual

Reimplemented from CPDF_Font.

Definition at line 838 of file cpdf_cidfont.cpp.

◆ GetVertOrigin()

CFX_Point16 CPDF_CIDFont::GetVertOrigin ( uint16_t cid) const

Definition at line 618 of file cpdf_cidfont.cpp.

◆ GetVertWidth()

int16_t CPDF_CIDFont::GetVertWidth ( uint16_t cid) const

Definition at line 605 of file cpdf_cidfont.cpp.

Referenced by FPDFFont_GetGlyphWidth(), and CPDF_TextObject::GetCharWidth().

+ Here is the caller graph for this function:

◆ GlyphFromCharCode()

int CPDF_CIDFont::GlyphFromCharCode ( uint32_t charcode,
bool * pVertGlyph )
overridevirtual

Implements CPDF_Font.

Definition at line 687 of file cpdf_cidfont.cpp.

References CharCodeFromUnicodeForEncoding(), CIDFromCharCode(), CIDSET_JAPAN1, fxcrt::WideString::IsEmpty(), fxge::kAppleRoman, kMacRoman, kStandard, fxge::kUnicode, kWinAnsi, fxcrt::WideString::operator[](), UnicodeFromAdobeName(), UnicodeFromCharCode(), CPDF_Font::UseTTCharmapMacRoman(), and CPDF_Font::UseTTCharmapMSUnicode().

Referenced by GetCharBBox().

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

◆ IsCIDFont()

bool CPDF_CIDFont::IsCIDFont ( ) const
overridevirtual

Reimplemented from CPDF_Font.

Definition at line 291 of file cpdf_cidfont.cpp.

◆ IsUnicodeCompatible()

bool CPDF_CIDFont::IsUnicodeCompatible ( ) const
overridevirtual

Implements CPDF_Font.

Definition at line 855 of file cpdf_cidfont.cpp.

◆ IsVertWriting()

bool CPDF_CIDFont::IsVertWriting ( ) const
overridevirtual

Reimplemented from CPDF_Font.

Definition at line 308 of file cpdf_cidfont.cpp.

Referenced by FPDFFont_GetGlyphWidth(), GetCharPosList(), and Load().

+ Here is the caller graph for this function:

◆ Load()

bool CPDF_CIDFont::Load ( )
overridevirtual

Implements CPDF_Font.

Definition at line 406 of file cpdf_cidfont.cpp.

References CPDF_CMapParser::CharsetFromOrdering(), CPDF_Font::CheckFontMetrics(), CIDSET_UNKNOWN, CPDF_FontGlobals::GetInstance(), CPDF_Font::IsEmbedded(), IsVertWriting(), fxge::kUnicode, CPDF_Font::LoadFontDescriptor(), and fxcrt::ByteString::operator==().

+ Here is the call graph for this function:

◆ UnicodeFromCharCode()

WideString CPDF_CIDFont::UnicodeFromCharCode ( uint32_t charcode) const
overridevirtual

Reimplemented from CPDF_Font.

Definition at line 312 of file cpdf_cidfont.cpp.

References fxcrt::WideString::WideString(), fxcrt::WideString::WideString(), fxcrt::WideString::IsEmpty(), and CPDF_Font::UnicodeFromCharCode().

Referenced by GlyphFromCharCode().

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

Member Data Documentation

◆ CONSTRUCT_VIA_MAKE_RETAIN

CPDF_CIDFont::CONSTRUCT_VIA_MAKE_RETAIN

Definition at line 38 of file cpdf_cidfont.h.


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