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_substfont.h
Go to the documentation of this file.
1// Copyright 2016 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#ifndef CORE_FXGE_CFX_SUBSTFONT_H_
8#define CORE_FXGE_CFX_SUBSTFONT_H_
9
10#include "core/fxcrt/bytestring.h"
11#include "core/fxcrt/fx_codepage.h"
12
14 public:
17
18#if defined(PDF_USE_SKIA)
19 int GetOriginalWeight() const;
20#endif
21 void UseChromeSerif();
22
23 void SetIsBuiltInGenericFont() { m_bFlagMM = true; }
24 bool IsBuiltInGenericFont() const { return m_bFlagMM; }
25
26 ByteString m_Family;
28 int m_Weight = 0;
30 int m_WeightCJK = 0;
31
32 bool m_bSubstCJK = false;
33 bool m_bItalicCJK = false;
34
35 private:
36 bool m_bFlagMM = false;
37};
38
39#endif // CORE_FXGE_CFX_SUBSTFONT_H_
ByteString m_Family
void SetIsBuiltInGenericFont()
FX_Charset m_Charset
bool IsBuiltInGenericFont() const
bool KeyExist(const ByteString &key) const
int GetIntegerFor(const ByteString &key) const
RetainPtr< const CPDF_Stream > GetStreamFor(const ByteString &key) const
int GetIntegerFor(const ByteString &key, int default_int) const
static CPDF_FontGlobals * GetInstance()
virtual FX_RECT GetCharBBox(uint32_t charcode)=0
virtual bool IsTrueTypeFont() const
Definition cpdf_font.cpp:67
virtual const CPDF_CIDFont * AsCIDFont() const
int m_ItalicAngle
Definition cpdf_font.h:182
virtual void WillBeDestroyed()
int FallbackGlyphFromCharcode(int fallbackFont, uint32_t charcode)
void LoadFontDescriptor(const CPDF_Dictionary *pFontDesc)
virtual CPDF_CIDFont * AsCIDFont()
absl::optional< FX_Charset > GetSubstFontCharset() const
virtual bool IsType1Font() const
Definition cpdf_font.cpp:63
virtual bool IsVertWriting() const
CPDF_Font(CPDF_Document *pDocument, RetainPtr< CPDF_Dictionary > pFontDict)
Definition cpdf_font.cpp:52
~CPDF_Font() override
Definition cpdf_font.cpp:58
void LoadUnicodeMap() const
static RetainPtr< CPDF_Font > Create(CPDF_Document *pDoc, RetainPtr< CPDF_Dictionary > pFontDict, FormFactoryIface *pFactory)
virtual uint32_t CharCodeFromUnicode(wchar_t Unicode) const
virtual const CPDF_TrueTypeFont * AsTrueTypeFont() const
Definition cpdf_font.cpp:87
virtual const CPDF_Type1Font * AsType1Font() const
Definition cpdf_font.cpp:79
int m_Flags
Definition cpdf_font.h:178
virtual bool IsCIDFont() const
Definition cpdf_font.cpp:75
int m_StemV
Definition cpdf_font.h:179
virtual WideString UnicodeFromCharCode(uint32_t charcode) const
virtual const CPDF_Type3Font * AsType3Font() const
Definition cpdf_font.cpp:95
static RetainPtr< CPDF_Font > GetStockFont(CPDF_Document *pDoc, ByteStringView fontname)
static bool UseTTCharmap(const RetainPtr< CFX_Face > &face, int platform_id, int encoding_id)
virtual size_t CountChar(ByteStringView pString) const
void AppendChar(ByteString *str, uint32_t charcode) const
int GetStringWidth(ByteStringView pString)
virtual CPDF_Type1Font * AsType1Font()
Definition cpdf_font.cpp:83
virtual bool HasFontWidths() const
virtual bool IsType3Font() const
Definition cpdf_font.cpp:71
virtual CPDF_Type3Font * AsType3Font()
Definition cpdf_font.cpp:99
virtual CPDF_TrueTypeFont * AsTrueTypeFont()
Definition cpdf_font.cpp:91
FX_RECT m_FontBBox
Definition cpdf_font.h:183
int GetFontWeight() const
virtual int AppendChar(char *buf, uint32_t charcode) const
int m_Ascent
Definition cpdf_font.h:180
int m_Descent
Definition cpdf_font.h:181
virtual uint32_t GetNextChar(ByteStringView pString, size_t *pOffset) const
bool m_bToUnicodeLoaded
Definition cpdf_font.h:177
uint32_t FallbackFontFromCharcode(uint32_t charcode)
bool IsStandardFont() const
static FX_RECT GetCharBBoxForFace(const RetainPtr< CFX_Face > &face)
void CheckFontMetrics()
CFX_Font * GetFontFallback(int position)
size_t GetUnicodeCountByCharcodeForTesting(uint32_t charcode) const
uint32_t ReverseLookup(wchar_t unicode) const
CPDF_ToUnicodeMap(RetainPtr< const CPDF_Stream > pStream)
WideString Lookup(uint32_t charcode) const
bool IsBase14Font() const
CPDF_Type3Font * AsType3Font() override
void WillBeDestroyed() override
bool IsType3Font() const override
void SetPageResources(CPDF_Dictionary *pResources)
CPDF_Type3Char * LoadChar(uint32_t charcode)
void LoadGlyphMap() override
FX_RECT GetCharBBox(uint32_t charcode) override
~CPDF_Type3Font() override
CFX_Matrix & GetFontMatrix()
int GetCharWidthF(uint32_t charcode) override
const CPDF_Type3Font * AsType3Font() const override
bool Load() override
bool operator==(const ByteString &other) const
bool operator==(const char *ptr) const
CharType operator[](const size_t index) const
Definition widestring.h:146
bool IsEmpty() const
Definition widestring.h:118
const char * CharNameFromPredefinedCharSet(FontEncoding encoding, uint8_t charcode)
FontEncoding
FX_Charset
Definition fx_codepage.h:70
#define FXFONT_USEEXTERNATTR
Definition fx_font.h:39
#define FXFONT_NONSYMBOLIC
Definition fx_font.h:32
#define FXFONT_FW_NORMAL
Definition fx_font.h:22
#define FXFONT_ITALIC
Definition fx_font.h:33
#define FXFT_Get_Glyph_Width(face)
Definition fx_freetype.h:58
#define FXFT_Get_Glyph_Height(face)
Definition fx_freetype.h:59
#define FXFT_Get_Glyph_HoriBearingX(face)
Definition fx_freetype.h:56
#define FXFT_Get_Glyph_HoriBearingY(face)
Definition fx_freetype.h:57
#define CONSTRUCT_VIA_MAKE_RETAIN
Definition retain_ptr.h:224
FX_RECT & operator=(const FX_RECT &that)=default
int32_t bottom
int32_t right
int32_t top
int32_t left