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
fx_font.h File Reference

(9c1f44f67466fea2fb20bb6f31fea388d8c65961)

#include <vector>
#include "core/fxcrt/bytestring.h"
#include "core/fxcrt/fx_coordinates.h"
#include "third_party/base/containers/span.h"
+ Include dependency graph for fx_font.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FXFONT_FF_FIXEDPITCH   (1 << 0)
 
#define FXFONT_FF_ROMAN   (1 << 4)
 
#define FXFONT_FF_SCRIPT   (4 << 4)
 
#define FXFONT_FW_NORMAL   400
 
#define FXFONT_FW_BOLD   700
 
#define FXFONT_FW_BOLD_BOLD   900
 
#define FXFONT_NORMAL   (0)
 
#define FXFONT_FIXED_PITCH   (1 << 0)
 
#define FXFONT_SERIF   (1 << 1)
 
#define FXFONT_SYMBOLIC   (1 << 2)
 
#define FXFONT_SCRIPT   (1 << 3)
 
#define FXFONT_NONSYMBOLIC   (1 << 5)
 
#define FXFONT_ITALIC   (1 << 6)
 
#define FXFONT_ALLCAP   (1 << 16)
 
#define FXFONT_SMALLCAP   (1 << 17)
 
#define FXFONT_FORCE_BOLD   (1 << 18)
 
#define FXFONT_USEEXTERNATTR   0x80000
 

Functions

FX_RECT GetGlyphsBBox (const std::vector< TextGlyphPos > &glyphs, int anti_alias)
 
ByteString GetNameFromTT (pdfium::span< const uint8_t > name_table, uint32_t name)
 
size_t GetTTCIndex (pdfium::span< const uint8_t > pFontData, size_t font_offset)
 
bool FontStyleIsForceBold (uint32_t style)
 
bool FontStyleIsItalic (uint32_t style)
 
bool FontStyleIsFixedPitch (uint32_t style)
 
bool FontStyleIsSymbolic (uint32_t style)
 
bool FontStyleIsNonSymbolic (uint32_t style)
 
bool FontStyleIsAllCaps (uint32_t style)
 
bool FontStyleIsSerif (uint32_t style)
 
bool FontStyleIsScript (uint32_t style)
 
bool FontFamilyIsFixedPitch (uint32_t family)
 
bool FontFamilyIsRoman (uint32_t family)
 
bool FontFamilyIsScript (int32_t family)
 
wchar_t UnicodeFromAdobeName (const char *name)
 
ByteString AdobeNameFromUnicode (wchar_t unicode)
 

Variables

constexpr uint16_t kNamePlatformAppleUnicode = 0
 
constexpr uint16_t kNamePlatformMac = 1
 
constexpr uint16_t kNamePlatformWindows = 3
 

Macro Definition Documentation

◆ FXFONT_ALLCAP

#define FXFONT_ALLCAP   (1 << 16)

Definition at line 34 of file fx_font.h.

◆ FXFONT_FF_FIXEDPITCH

#define FXFONT_FF_FIXEDPITCH   (1 << 0)

Definition at line 17 of file fx_font.h.

◆ FXFONT_FF_ROMAN

#define FXFONT_FF_ROMAN   (1 << 4)

Definition at line 18 of file fx_font.h.

◆ FXFONT_FF_SCRIPT

#define FXFONT_FF_SCRIPT   (4 << 4)

Definition at line 19 of file fx_font.h.

◆ FXFONT_FIXED_PITCH

#define FXFONT_FIXED_PITCH   (1 << 0)

Definition at line 28 of file fx_font.h.

◆ FXFONT_FORCE_BOLD

#define FXFONT_FORCE_BOLD   (1 << 18)

Definition at line 36 of file fx_font.h.

◆ FXFONT_FW_BOLD

#define FXFONT_FW_BOLD   700

Definition at line 23 of file fx_font.h.

◆ FXFONT_FW_BOLD_BOLD

#define FXFONT_FW_BOLD_BOLD   900

Definition at line 24 of file fx_font.h.

◆ FXFONT_FW_NORMAL

#define FXFONT_FW_NORMAL   400

Definition at line 22 of file fx_font.h.

◆ FXFONT_ITALIC

#define FXFONT_ITALIC   (1 << 6)

Definition at line 33 of file fx_font.h.

◆ FXFONT_NONSYMBOLIC

#define FXFONT_NONSYMBOLIC   (1 << 5)

Definition at line 32 of file fx_font.h.

◆ FXFONT_NORMAL

#define FXFONT_NORMAL   (0)

Definition at line 27 of file fx_font.h.

◆ FXFONT_SCRIPT

#define FXFONT_SCRIPT   (1 << 3)

Definition at line 31 of file fx_font.h.

◆ FXFONT_SERIF

#define FXFONT_SERIF   (1 << 1)

Definition at line 29 of file fx_font.h.

◆ FXFONT_SMALLCAP

#define FXFONT_SMALLCAP   (1 << 17)

Definition at line 35 of file fx_font.h.

◆ FXFONT_SYMBOLIC

#define FXFONT_SYMBOLIC   (1 << 2)

Definition at line 30 of file fx_font.h.

◆ FXFONT_USEEXTERNATTR

#define FXFONT_USEEXTERNATTR   0x80000

Definition at line 39 of file fx_font.h.

Function Documentation

◆ AdobeNameFromUnicode()

ByteString AdobeNameFromUnicode ( wchar_t unicode)

Definition at line 142 of file fx_font.cpp.

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

+ Here is the call graph for this function:

◆ FontFamilyIsFixedPitch()

bool FontFamilyIsFixedPitch ( uint32_t family)
inline

Definition at line 84 of file fx_font.h.

Referenced by CFX_FolderFontInfo::FindFont(), and CFX_AndroidFontInfo::MapFont().

+ Here is the caller graph for this function:

◆ FontFamilyIsRoman()

bool FontFamilyIsRoman ( uint32_t family)
inline

Definition at line 87 of file fx_font.h.

Referenced by CFX_AndroidFontInfo::MapFont().

+ Here is the caller graph for this function:

◆ FontFamilyIsScript()

bool FontFamilyIsScript ( int32_t family)
inline

Definition at line 90 of file fx_font.h.

Referenced by CFX_AndroidFontInfo::MapFont().

+ Here is the caller graph for this function:

◆ FontStyleIsAllCaps()

bool FontStyleIsAllCaps ( uint32_t style)
inline

Definition at line 74 of file fx_font.h.

Referenced by CPDF_SimpleFont::LoadCommon().

+ Here is the caller graph for this function:

◆ FontStyleIsFixedPitch()

bool FontStyleIsFixedPitch ( uint32_t style)
inline

Definition at line 65 of file fx_font.h.

Referenced by CPDF_SimpleFont::LoadSubstFont().

+ Here is the caller graph for this function:

◆ FontStyleIsForceBold()

bool FontStyleIsForceBold ( uint32_t style)
inline

Definition at line 59 of file fx_font.h.

Referenced by FPDFEditEmbedderTest::CheckFontDescriptor(), CFX_FontMapper::FindSubstFont(), CFGAS_DefaultFontManager::GetFont(), and CFGAS_PDFFontMgr::GetFont().

+ Here is the caller graph for this function:

◆ FontStyleIsItalic()

bool FontStyleIsItalic ( uint32_t style)
inline

Definition at line 62 of file fx_font.h.

Referenced by FPDFEditEmbedderTest::CheckFontDescriptor(), CFX_FontMapper::FindSubstFont(), CFGAS_DefaultFontManager::GetFont(), and CFGAS_PDFFontMgr::GetFont().

+ Here is the caller graph for this function:

◆ FontStyleIsNonSymbolic()

bool FontStyleIsNonSymbolic ( uint32_t style)
inline

Definition at line 71 of file fx_font.h.

Referenced by FPDFEditEmbedderTest::CheckFontDescriptor(), and CPDF_Type1Font::Load().

+ Here is the caller graph for this function:

◆ FontStyleIsScript()

bool FontStyleIsScript ( uint32_t style)
inline

Definition at line 80 of file fx_font.h.

◆ FontStyleIsSerif()

bool FontStyleIsSerif ( uint32_t style)
inline

Definition at line 77 of file fx_font.h.

◆ FontStyleIsSymbolic()

bool FontStyleIsSymbolic ( uint32_t style)
inline

Definition at line 68 of file fx_font.h.

Referenced by CPDF_SimpleFont::LoadCommon(), and CPDF_Type1Font::LoadGlyphMap().

+ Here is the caller graph for this function:

◆ GetGlyphsBBox()

FX_RECT GetGlyphsBBox ( const std::vector< TextGlyphPos > & glyphs,
int anti_alias )

Definition at line 35 of file fx_font.cpp.

◆ GetNameFromTT()

ByteString GetNameFromTT ( pdfium::span< const uint8_t > name_table,
uint32_t name )

Definition at line 79 of file fx_font.cpp.

References fxcrt::ByteString::ByteString(), fxcrt::WideString::FromUTF16BE(), fxcrt::ByteString::IsEmpty(), kNamePlatformMac, and kNamePlatformWindows.

+ Here is the call graph for this function:

◆ GetTTCIndex()

size_t GetTTCIndex ( pdfium::span< const uint8_t > pFontData,
size_t font_offset )

Definition at line 127 of file fx_font.cpp.

◆ UnicodeFromAdobeName()

wchar_t UnicodeFromAdobeName ( const char * name)

Definition at line 138 of file fx_font.cpp.

References FXFT_unicode_from_adobe_name().

Referenced by CPDF_CIDFont::GlyphFromCharCode().

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

Variable Documentation

◆ kNamePlatformAppleUnicode

uint16_t kNamePlatformAppleUnicode = 0
constexpr

Definition at line 42 of file fx_font.h.

◆ kNamePlatformMac

uint16_t kNamePlatformMac = 1
constexpr

Definition at line 43 of file fx_font.h.

Referenced by GetNameFromTT().

◆ kNamePlatformWindows

uint16_t kNamePlatformWindows = 3
constexpr

Definition at line 44 of file fx_font.h.

Referenced by GetNameFromTT().