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_truetypefont.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_FPDFAPI_FONT_CPDF_TRUETYPEFONT_H_
8#define CORE_FPDFAPI_FONT_CPDF_TRUETYPEFONT_H_
9
10#include "core/fpdfapi/font/cpdf_simplefont.h"
11#include "core/fxcrt/retain_ptr.h"
12
13class CPDF_TrueTypeFont final : public CPDF_SimpleFont {
14 public:
16 ~CPDF_TrueTypeFont() override;
17
18 // CPDF_Font:
19 bool IsTrueTypeFont() const override;
20 const CPDF_TrueTypeFont* AsTrueTypeFont() const override;
21 CPDF_TrueTypeFont* AsTrueTypeFont() override;
22
23 private:
24 enum class CharmapType { kMSUnicode, kMSSymbol, kMacRoman, kOther };
25
26 CPDF_TrueTypeFont(CPDF_Document* pDocument,
27 RetainPtr<CPDF_Dictionary> pFontDict);
28
29 // CPDF_Font:
30 bool Load() override;
31
32 // CPDF_SimpleFont:
33 void LoadGlyphMap() override;
34
35 bool HasAnyGlyphIndex() const;
36 CharmapType DetermineCharmapType() const;
37 FontEncoding DetermineEncoding() const;
38 void SetGlyphIndicesFromFirstChar();
39};
40
41#endif // CORE_FPDFAPI_FONT_CPDF_TRUETYPEFONT_H_
float GetLineDashPhase() const
float GetLineWidth() const
CFX_GraphStateData::LineCap GetLineCap() const
CFX_GraphStateData::LineJoin GetLineJoin() const
bool HasRef() const
const CPDF_Color * GetStrokeColor() const
const CPDF_Color * GetFillColor() const
bool GetRGB(int *R, int *G, int *B) const
bool IsColorSpaceRGB() const
const ByteString & GetName() const
const ByteString & GetPropertyName() const
ParamType GetParamType() const
const CFX_Matrix & form_matrix() const
float GetStrokeAlpha() const
BlendMode GetBlendType() const
ByteString GetBlendMode() const
void SetImage(RetainPtr< CPDF_Image > pImage)
const CFX_Matrix & matrix() const
bool ProcessPageObjects(fxcrt::ostringstream *buf)
CPDF_PageContentGenerator(CPDF_PageObjectHolder *pObjHolder)
void UpdateStream(size_t stream_index, fxcrt::ostringstream *buf)
size_t AddStream(fxcrt::ostringstream *buf)
CPDF_PageContentManager(CPDF_PageObjectHolder *page_obj_holder, CPDF_Document *document)
const CPDF_ColorState & color_state() const
void SetDirty(bool value)
const CPDF_GeneralState & general_state() const
const ByteString & GetResourceName() const
const CPDF_ClipPath & clip_path() const
virtual Type GetType() const =0
CPDF_GeneralState & mutable_general_state()
const CPDF_ContentMarks * GetContentMarks() const
void SetResourceName(const ByteString &resource_name)
const CFX_GraphState & graph_state() const
bool has_winding_filltype() const
bool stroke() const
const CFX_Matrix & matrix() const
bool has_alternate_filltype() const
bool has_no_filltype() const
bool IsRect() const
Definition cpdf_path.cpp:37
~CPDF_StringArchiveStream() override
CPDF_StringArchiveStream(fxcrt::ostringstream *stream)
FX_FILESIZE CurrentOffset() const override
bool WriteBlock(pdfium::span< const uint8_t > buffer) override
CFX_Matrix GetTextMatrix() const
float GetFontSize() const
TextRenderingMode GetTextRenderMode() const
bool IsTrueTypeFont() const override
void LoadGlyphMap() override
CPDF_TrueTypeFont * AsTrueTypeFont() override
const CPDF_TrueTypeFont * AsTrueTypeFont() const override
~CPDF_TrueTypeFont() override
static ByteString Format(const char *pFormat,...)
ByteString & operator=(ByteString &&that) noexcept
bool IsEmpty() const
Definition bytestring.h:119
CharType operator[](const size_t index) const
Definition bytestring.h:150
FontEncoding
ByteString PDF_NameEncode(const ByteString &orig)
BlendMode
Definition fx_dib.h:49
#define FX_FILESIZE
Definition fx_types.h:19
#define CHECK(cvref)
#define CONSTRUCT_VIA_MAKE_RETAIN
Definition retain_ptr.h:224