Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <cfx_font.h>
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_Face > | GetFace () const |
FXFT_FaceRec * | GetFaceRec () const |
CFX_SubstFont * | GetSubstFont () const |
int | GetSubstFontItalicAngle () const |
const CFX_GlyphBitmap * | LoadGlyphBitmap (uint32_t glyph_index, bool bFontStyle, const CFX_Matrix &matrix, int dest_width, int anti_alias, CFX_TextRenderOptions *text_options) const |
const CFX_Path * | LoadGlyphPath (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 |
absl::optional< FX_RECT > | GetGlyphBBox (uint32_t glyph_index) |
bool | IsItalic () const |
bool | IsBold () const |
bool | IsFixedWidth () const |
bool | IsVertical () const |
ByteString | GetPsName () const |
ByteString | GetFamilyName () const |
ByteString | GetFaceName () const |
ByteString | GetBaseFontName () const |
bool | IsTTFont () const |
absl::optional< FX_RECT > | GetRawBBox () const |
absl::optional< FX_RECT > | GetBBox () const |
bool | IsEmbedded () const |
FontType | GetFontType () const |
void | SetFontType (FontType type) |
uint64_t | GetObjectTag () const |
pdfium::span< uint8_t > | GetFontSpan () const |
std::unique_ptr< CFX_Path > | LoadGlyphPathImpl (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 ByteString | GetDefaultFontNameByCharset (FX_Charset nCharset) |
static FX_Charset | GetCharSetFromUnicode (uint16_t word) |
Static Public Attributes | |
static const CharsetFontMap | kDefaultTTFMap [] |
static const char | kUntitledFontName [] = "Untitled" |
static const char | kDefaultAnsiFontName [] = "Helvetica" |
static const char | kUniversalDefaultFontName [] = "Arial Unicode MS" |
Definition at line 37 of file cfx_font.h.
|
strong |
Enumerator | |
---|---|
kUnknown | |
kCIDTrueType |
Definition at line 45 of file cfx_font.h.
|
default |
CFX_Font::~CFX_Font | ( | ) |
Definition at line 211 of file cfx_font.cpp.
int CFX_Font::GetAscent | ( | ) | const |
Definition at line 277 of file cfx_font.cpp.
ByteString CFX_Font::GetBaseFontName | ( | ) | const |
Definition at line 394 of file cfx_font.cpp.
References fxcrt::ByteString::ByteString(), GetPsName(), fxcrt::ByteString::IsEmpty(), IsTTFont(), kUntitledFontName, fxcrt::ByteString::operator!=(), fxcrt::operator+(), and fxcrt::ByteString::operator+=().
absl::optional< FX_RECT > CFX_Font::GetBBox | ( | ) | const |
Definition at line 418 of file cfx_font.cpp.
References FX_RECT::bottom, FX_RECT::left, FX_RECT::right, and FX_RECT::top.
|
static |
Definition at line 112 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().
|
static |
Definition at line 103 of file cfx_font.cpp.
References kDefaultTTFMap, and kUniversalDefaultFontName.
int CFX_Font::GetDescent | ( | ) | const |
Definition at line 281 of file cfx_font.cpp.
Referenced by CBC_OneDimWriter::CalcTextInfo().
Definition at line 78 of file cfx_font.h.
ByteString CFX_Font::GetFaceName | ( | ) | const |
Definition at line 381 of file cfx_font.cpp.
References fxcrt::ByteString::ByteString(), fxcrt::operator+(), and fxcrt::ByteString::operator+=().
|
inline |
Definition at line 79 of file cfx_font.h.
Referenced by CFX_RenderDevice::DrawNormalText().
ByteString CFX_Font::GetFamilyName | ( | ) | const |
Definition at line 368 of file cfx_font.cpp.
References fxcrt::ByteString::ByteString().
Referenced by FPDFFont_GetFontName().
|
inline |
Definition at line 128 of file cfx_font.h.
|
inline |
Definition at line 125 of file cfx_font.h.
absl::optional< FX_RECT > CFX_Font::GetGlyphBBox | ( | uint32_t | glyph_index | ) |
Definition at line 285 of file cfx_font.cpp.
int CFX_Font::GetGlyphWidth | ( | uint32_t | glyph_index | ) | const |
Definition at line 239 of file cfx_font.cpp.
References GetGlyphWidth().
Referenced by CBC_OneDimWriter::CalcTextInfo(), and GetCharPosList().
int CFX_Font::GetGlyphWidth | ( | uint32_t | glyph_index, |
int | dest_width, | ||
int | weight ) const |
Definition at line 243 of file cfx_font.cpp.
Referenced by GetGlyphWidth().
int CFX_Font::GetGlyphWidthImpl | ( | uint32_t | glyph_index, |
int | dest_width, | ||
int | weight ) const |
Definition at line 250 of file cfx_font.cpp.
|
inline |
Definition at line 127 of file cfx_font.h.
Referenced by CFX_PSFontTracker::AddFontObject(), and CFX_PSFontTracker::SeenFontObject().
ByteString CFX_Font::GetPsName | ( | ) | const |
Definition at line 358 of file cfx_font.cpp.
References fxcrt::ByteString::ByteString(), fxcrt::ByteString::IsEmpty(), kUntitledFontName, and fxcrt::ByteString::operator=().
Referenced by GetBaseFontName().
absl::optional< FX_RECT > CFX_Font::GetRawBBox | ( | ) | const |
Definition at line 412 of file cfx_font.cpp.
|
inline |
Definition at line 82 of file cfx_font.h.
Referenced by GetSubstFontItalicAngle(), CFX_GlyphCache::LoadGlyphPath(), and CFX_Face::RenderGlyph().
int CFX_Font::GetSubstFontItalicAngle | ( | ) | const |
Definition at line 164 of file cfx_font.cpp.
References GetSubstFont(), and CFX_SubstFont::m_ItalicAngle.
Referenced by CFX_SkiaDeviceDriver::DrawDeviceText().
bool CFX_Font::IsBold | ( | ) | const |
Definition at line 343 of file cfx_font.cpp.
|
inline |
Definition at line 124 of file cfx_font.h.
Referenced by CTextOnlyPrinterDriver::DrawDeviceText().
bool CFX_Font::IsFixedWidth | ( | ) | const |
Definition at line 347 of file cfx_font.cpp.
bool CFX_Font::IsItalic | ( | ) | const |
Definition at line 331 of file cfx_font.cpp.
References fxcrt::ByteString::MakeLower().
bool CFX_Font::IsTTFont | ( | ) | const |
Definition at line 273 of file cfx_font.cpp.
Referenced by CTextOnlyPrinterDriver::DrawDeviceText(), and GetBaseFontName().
|
inline |
Definition at line 111 of file cfx_font.h.
Referenced by CFX_GlyphCache::LoadGlyphPath(), and CFX_Face::RenderGlyph().
bool CFX_Font::LoadEmbedded | ( | pdfium::span< const uint8_t > | src_span, |
bool | force_vertical, | ||
uint64_t | object_tag ) |
Definition at line 260 of file cfx_font.cpp.
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 453 of file cfx_font.cpp.
Referenced by CFX_RenderDevice::DrawNormalText().
const CFX_Path * CFX_Font::LoadGlyphPath | ( | uint32_t | glyph_index, |
int | dest_width ) const |
Definition at line 465 of file cfx_font.cpp.
Referenced by FPDFFont_GetGlyphPath().
std::unique_ptr< CFX_Path > CFX_Font::LoadGlyphPathImpl | ( | uint32_t | glyph_index, |
int | dest_width ) const |
Definition at line 444 of file cfx_font.cpp.
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 220 of file cfx_font.cpp.
Definition at line 126 of file cfx_font.h.
|
static |
Definition at line 58 of file cfx_font.h.
Referenced by CPDF_BAFontMap::CPDF_BAFontMap().
|
static |
Definition at line 78 of file cfx_font.h.
Referenced by FPDF_GetDefaultTTFMap(), and GetDefaultFontNameByCharset().
|
static |
Definition at line 59 of file cfx_font.h.
Referenced by GetDefaultFontNameByCharset(), and CPDF_BAFontMap::GetWordFontIndex().
|
static |
Definition at line 56 of file cfx_font.h.
Referenced by GetBaseFontName(), and GetPsName().