![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <cpdf_font.h>
Classes | |
| class | FormFactoryIface |
| class | FormIface |
Public Member Functions | |
| virtual bool | IsType1Font () const |
| virtual bool | IsTrueTypeFont () const |
| virtual bool | IsType3Font () const |
| virtual bool | IsCIDFont () const |
| virtual const CPDF_Type1Font * | AsType1Font () const |
| virtual CPDF_Type1Font * | AsType1Font () |
| virtual const CPDF_TrueTypeFont * | AsTrueTypeFont () const |
| virtual CPDF_TrueTypeFont * | AsTrueTypeFont () |
| virtual const CPDF_Type3Font * | AsType3Font () const |
| virtual CPDF_Type3Font * | AsType3Font () |
| virtual const CPDF_CIDFont * | AsCIDFont () const |
| virtual CPDF_CIDFont * | AsCIDFont () |
| virtual void | WillBeDestroyed () |
| virtual bool | IsVertWriting () const |
| virtual bool | IsUnicodeCompatible () const =0 |
| virtual uint32_t | GetNextChar (ByteStringView pString, size_t *pOffset) const |
| virtual size_t | CountChar (ByteStringView pString) const |
| virtual void | AppendChar (ByteString *buf, uint32_t charcode) const |
| virtual int | GlyphFromCharCode (uint32_t charcode, bool *pVertGlyph)=0 |
| virtual WideString | UnicodeFromCharCode (uint32_t charcode) const |
| virtual uint32_t | CharCodeFromUnicode (wchar_t Unicode) const |
| virtual bool | HasFontWidths () const |
| ByteString | GetBaseFontName () const |
| std::optional< FX_Charset > | GetSubstFontCharset () const |
| bool | IsEmbedded () const |
| RetainPtr< CPDF_Dictionary > | GetMutableFontDict () |
| RetainPtr< const CPDF_Dictionary > | GetFontDict () const |
| uint32_t | GetFontDictObjNum () const |
| bool | FontDictIs (const CPDF_Dictionary *pThat) const |
| void | ClearFontDict () |
| bool | IsStandardFont () const |
| bool | HasFace () const |
| const FX_RECT & | GetFontBBox () 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 |
| virtual int | GetCharWidthF (uint32_t charcode)=0 |
| virtual FX_RECT | GetCharBBox (uint32_t charcode)=0 |
| CPDF_Document * | GetDocument () const |
| CFX_Font * | GetFont () |
| const CFX_Font * | GetFont () const |
| CFX_Font * | GetFontFallback (int position) |
| const ByteString & | GetResourceName () 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 | |
| Observable & | operator= (const Observable &that)=delete |
| ~Observable () | |
| void | AddObserver (ObserverIface *pObserver) |
| void | RemoveObserver (ObserverIface *pObserver) |
| void | NotifyObservers () |
Static Public Member Functions | |
| static RetainPtr< CPDF_Font > | Create (CPDF_Document *pDoc, RetainPtr< CPDF_Dictionary > pFontDict, FormFactoryIface *pFactory) |
| static RetainPtr< CPDF_Font > | GetStockFont (CPDF_Document *pDoc, ByteStringView fontname) |
Static Public Attributes | |
| static constexpr uint32_t | kInvalidCharCode = static_cast<uint32_t>(-1) |
Protected Member Functions | |
| CPDF_Font (CPDF_Document *pDocument, RetainPtr< CPDF_Dictionary > pFontDict) | |
| ~CPDF_Font () override | |
| virtual bool | Load ()=0 |
| 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 | |
| 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 | |
| UnownedPtr< CPDF_Document > const | m_pDocument |
| ByteString | m_ResourceName |
| CFX_Font | m_Font |
| std::vector< std::unique_ptr< CFX_Font > > | m_FontFallbacks |
| RetainPtr< CPDF_StreamAcc > | m_pFontFile |
| RetainPtr< CPDF_Dictionary > | m_pFontDict |
| ByteString | m_BaseFontName |
| std::unique_ptr< CPDF_ToUnicodeMap > | m_pToUnicodeMap |
| bool | m_bToUnicodeLoaded = false |
| bool | m_bWillBeDestroyed = 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 |
Definition at line 37 of file cpdf_font.h.
|
protected |
Definition at line 50 of file cpdf_font.cpp.
References CPDF_Font().
Referenced by CPDF_Font().
|
overrideprotected |
Definition at line 56 of file cpdf_font.cpp.
|
virtual |
Reimplemented in CPDF_CIDFont.
Definition at line 129 of file cpdf_font.cpp.
References fxcrt::ByteString::operator+=().
|
virtual |
Reimplemented in CPDF_CIDFont.
Definition at line 106 of file cpdf_font.cpp.
Referenced by FPDFFont_GetGlyphWidth(), and GetCharPosList().
|
virtual |
Reimplemented in CPDF_CIDFont.
Definition at line 102 of file cpdf_font.cpp.
Referenced by IsVertWriting().
|
virtual |
Reimplemented in CPDF_TrueTypeFont.
Definition at line 90 of file cpdf_font.cpp.
|
virtual |
Reimplemented in CPDF_TrueTypeFont.
Definition at line 86 of file cpdf_font.cpp.
|
virtual |
Reimplemented in CPDF_Type1Font.
Definition at line 82 of file cpdf_font.cpp.
|
virtual |
Reimplemented in CPDF_Type1Font.
Definition at line 78 of file cpdf_font.cpp.
Referenced by IsStandardFont().
|
virtual |
Reimplemented in CPDF_Type3Font.
Definition at line 98 of file cpdf_font.cpp.
|
virtual |
Reimplemented in CPDF_Type3Font.
Definition at line 94 of file cpdf_font.cpp.
|
virtual |
Reimplemented in CPDF_CIDFont, and CPDF_SimpleFont.
Definition at line 140 of file cpdf_font.cpp.
References LoadUnicodeMap(), and m_bToUnicodeLoaded.
Referenced by CPDF_CIDFont::CharCodeFromUnicode(), CPDF_SimpleFont::CharCodeFromUnicode(), FPDFFont_GetGlyphPath(), and FPDFFont_GetGlyphWidth().
|
protected |
Definition at line 212 of file cpdf_font.cpp.
References FX_RECT::bottom, GetCharBBox(), FX_RECT::left, m_Ascent, m_Descent, m_FontBBox, NormalizeFontMetric(), FX_RECT::operator=(), FX_RECT::right, and FX_RECT::top.
Referenced by CPDF_Type3Font::CheckType3FontMetrics(), CPDF_CIDFont::Load(), and CPDF_SimpleFont::LoadCommon().
|
inline |
Definition at line 107 of file cpdf_font.h.
|
virtual |
Reimplemented in CPDF_CIDFont.
Definition at line 110 of file cpdf_font.cpp.
|
static |
Definition at line 296 of file cpdf_font.cpp.
References fxcrt::ByteString::operator==().
Referenced by GetStockFont().
| uint32_t CPDF_Font::FallbackFontFromCharcode | ( | uint32_t | charcode | ) |
Definition at line 372 of file cpdf_font.cpp.
Referenced by GetCharPosList().
| int CPDF_Font::FallbackGlyphFromCharcode | ( | int | fallbackFont, |
| uint32_t | charcode ) |
Definition at line 385 of file cpdf_font.cpp.
References UnicodeFromCharCode().
Referenced by GetCharPosList().
|
inline |
Definition at line 104 of file cpdf_font.h.
|
staticprotected |
Definition at line 352 of file cpdf_font.cpp.
References CharNameFromPredefinedCharSet(), and kBuiltin.
|
inline |
Definition at line 98 of file cpdf_font.h.
Referenced by FPDFFont_GetBaseFontName().
|
pure virtual |
Implemented in CPDF_CIDFont, CPDF_SimpleFont, and CPDF_Type3Font.
Referenced by CheckFontMetrics().
|
pure virtual |
Implemented in CPDF_CIDFont, CPDF_SimpleFont, and CPDF_Type3Font.
Referenced by FPDFEditEmbedderTest::CheckCompositeFontWidths(), CPDF_TextRenderer::DrawTextString(), FPDFFont_GetGlyphWidth(), and GetCharPosList().
|
inline |
Definition at line 126 of file cpdf_font.h.
|
inline |
Definition at line 128 of file cpdf_font.h.
Referenced by FPDFFont_GetFamilyName(), FPDFFont_GetFontData(), FPDFFont_GetGlyphPath(), and GetCharPosList().
|
inline |
Definition at line 129 of file cpdf_font.h.
|
inline |
Definition at line 111 of file cpdf_font.h.
References m_FontBBox.
Referenced by CPWL_Edit::GetCharArrayAutoFontSize().
|
inline |
Definition at line 102 of file cpdf_font.h.
|
inline |
Definition at line 103 of file cpdf_font.h.
| CFX_Font * CPDF_Font::GetFontFallback | ( | int | position | ) |
Definition at line 398 of file cpdf_font.cpp.
Referenced by FPDFFont_GetGlyphPath(), and GetCharPosList().
|
inline |
Definition at line 117 of file cpdf_font.h.
References m_Flags.
Referenced by FPDFFont_GetFlags().
| int CPDF_Font::GetFontWeight | ( | ) | const |
Definition at line 418 of file cpdf_font.cpp.
References m_StemV.
Referenced by FPDFFont_GetWeight().
|
inline |
Definition at line 118 of file cpdf_font.h.
References m_ItalicAngle.
Referenced by FPDFFont_GetItalicAngle().
|
inline |
Definition at line 101 of file cpdf_font.h.
|
virtual |
Reimplemented in CPDF_CIDFont.
Definition at line 328 of file cpdf_font.cpp.
|
inline |
Definition at line 133 of file cpdf_font.h.
|
static |
Definition at line 271 of file cpdf_font.cpp.
References Create(), CPDF_FontGlobals::GetInstance(), pdfium::font_encodings::kWinAnsiEncoding, and CPDF_FontGlobals::Set().
Referenced by FPDFText_LoadStandardFont(), and TEST_F().
| int CPDF_Font::GetStringWidth | ( | ByteStringView | pString | ) |
Definition at line 262 of file cpdf_font.cpp.
| std::optional< FX_Charset > CPDF_Font::GetSubstFontCharset | ( | ) | const |
Definition at line 344 of file cpdf_font.cpp.
References CFX_SubstFont::m_Charset.
|
inline |
Definition at line 112 of file cpdf_font.h.
References m_Ascent.
Referenced by FPDFFont_GetAscent().
|
inline |
Definition at line 113 of file cpdf_font.h.
References m_Descent.
Referenced by FPDFFont_GetDescent().
|
pure virtual |
Implemented in CPDF_CIDFont, and CPDF_SimpleFont.
Referenced by GetCharPosList().
|
inline |
Definition at line 109 of file cpdf_font.h.
Referenced by CPDF_SimpleFont::LoadCommon().
|
virtual |
Reimplemented in CPDF_SimpleFont.
Definition at line 147 of file cpdf_font.cpp.
|
virtual |
Reimplemented in CPDF_CIDFont.
Definition at line 74 of file cpdf_font.cpp.
Referenced by GetCharPosList(), TEST_F(), and TEST_F().
|
inline |
Definition at line 100 of file cpdf_font.h.
Referenced by FPDFFont_GetIsEmbedded(), GetCharPosList(), CPDF_CIDFont::Load(), and CPDF_SimpleFont::LoadCharMetrics().
| bool CPDF_Font::IsStandardFont | ( | ) | const |
Definition at line 336 of file cpdf_font.cpp.
References AsType1Font(), CPDF_Type1Font::IsBase14Font(), and IsType1Font().
Referenced by CPWL_Edit::GetCharArrayAutoFontSize().
|
virtual |
Reimplemented in CPDF_TrueTypeFont.
Definition at line 66 of file cpdf_font.cpp.
Referenced by TEST_F().
|
virtual |
Reimplemented in CPDF_Type1Font.
Definition at line 62 of file cpdf_font.cpp.
Referenced by IsStandardFont(), and TEST_F().
|
virtual |
Reimplemented in CPDF_Type3Font.
Definition at line 70 of file cpdf_font.cpp.
Referenced by CPDF_TextRenderer::DrawTextString().
|
pure virtual |
Implemented in CPDF_CIDFont, and CPDF_SimpleFont.
|
virtual |
Reimplemented in CPDF_CIDFont.
Definition at line 124 of file cpdf_font.cpp.
References AsCIDFont().
|
protectedpure virtual |
Implemented in CPDF_CIDFont, CPDF_TrueTypeFont, CPDF_Type1Font, and CPDF_Type3Font.
|
protected |
Definition at line 151 of file cpdf_font.cpp.
References FX_RECT::bottom, CPDF_Dictionary::GetIntegerFor(), CPDF_Dictionary::GetIntegerFor(), CPDF_Dictionary::GetStreamFor(), CPDF_Dictionary::KeyExist(), FX_RECT::left, m_Ascent, m_Descent, m_Flags, m_FontBBox, m_ItalicAngle, m_StemV, FX_RECT::right, and FX_RECT::top.
Referenced by CPDF_CIDFont::Load(), and CPDF_SimpleFont::LoadCommon().
|
protected |
Definition at line 253 of file cpdf_font.cpp.
References m_bToUnicodeLoaded.
Referenced by CharCodeFromUnicode(), and UnicodeFromCharCode().
|
inline |
Definition at line 134 of file cpdf_font.h.
|
virtual |
Reimplemented in CPDF_CIDFont, and CPDF_SimpleFont.
Definition at line 133 of file cpdf_font.cpp.
References LoadUnicodeMap(), and m_bToUnicodeLoaded.
Referenced by FallbackGlyphFromCharcode(), GetCharPosList(), CPDF_CIDFont::UnicodeFromCharCode(), and CPDF_SimpleFont::UnicodeFromCharCode().
|
staticprotected |
Definition at line 405 of file cpdf_font.cpp.
Referenced by UseTTCharmapMacRoman(), UseTTCharmapMSSymbol(), and UseTTCharmapMSUnicode().
Definition at line 147 of file cpdf_font.h.
References UseTTCharmap().
Referenced by CPDF_CIDFont::GlyphFromCharCode(), and CPDF_TrueTypeFont::LoadGlyphMap().
Definition at line 144 of file cpdf_font.h.
References UseTTCharmap().
Referenced by CPDF_TrueTypeFont::LoadGlyphMap(), and CPDF_Type1Font::LoadGlyphMap().
Definition at line 141 of file cpdf_font.h.
References UseTTCharmap().
Referenced by CPDF_CIDFont::GlyphFromCharCode().
|
virtual |
Reimplemented in CPDF_Type3Font.
Definition at line 120 of file cpdf_font.cpp.
References m_bWillBeDestroyed.
|
staticconstexpr |
Definition at line 62 of file cpdf_font.h.
Referenced by CPDF_TextObject::GetCharCode(), CPDF_TextObject::GetCharInfo(), CPVT_VariableText::Provider::GetCharWidth(), CPWL_EditImpl::Provider::GetCharWidth(), CPDF_TextObject::GetItemInfo(), and CPVT_VariableText::Provider::GetWordFontIndex().
|
protected |
Definition at line 176 of file cpdf_font.h.
Referenced by CheckFontMetrics(), GetTypeAscent(), and LoadFontDescriptor().
|
protected |
Definition at line 170 of file cpdf_font.h.
|
mutableprotected |
Definition at line 172 of file cpdf_font.h.
Referenced by CharCodeFromUnicode(), LoadUnicodeMap(), and UnicodeFromCharCode().
|
protected |
Definition at line 173 of file cpdf_font.h.
Referenced by WillBeDestroyed(), and CPDF_Type3Font::WillBeDestroyed().
|
protected |
Definition at line 177 of file cpdf_font.h.
Referenced by CheckFontMetrics(), GetTypeDescent(), and LoadFontDescriptor().
|
protected |
Definition at line 174 of file cpdf_font.h.
Referenced by GetFontFlags(), CPDF_Type1Font::Load(), CPDF_SimpleFont::LoadCommon(), LoadFontDescriptor(), CPDF_Type1Font::LoadGlyphMap(), and CPDF_SimpleFont::LoadSubstFont().
|
protected |
Definition at line 166 of file cpdf_font.h.
|
protected |
Definition at line 179 of file cpdf_font.h.
Referenced by CheckFontMetrics(), GetFontBBox(), CPDF_Type3Font::Load(), and LoadFontDescriptor().
|
protected |
Definition at line 167 of file cpdf_font.h.
|
protected |
Definition at line 178 of file cpdf_font.h.
Referenced by GetItalicAngle(), and LoadFontDescriptor().
|
protected |
Definition at line 164 of file cpdf_font.h.
|
protected |
Definition at line 169 of file cpdf_font.h.
|
protected |
Definition at line 168 of file cpdf_font.h.
|
mutableprotected |
Definition at line 171 of file cpdf_font.h.
|
protected |
Definition at line 165 of file cpdf_font.h.
|
protected |
Definition at line 175 of file cpdf_font.h.
Referenced by GetFontWeight(), and LoadFontDescriptor().