5#ifndef PDF_FONT_METRICS_STANDARD14_H
6#define PDF_FONT_METRICS_STANDARD14_H
10#include "PdfFontMetrics.h"
11#include <podofo/auxiliary/Rect.h>
15struct Standard14FontData;
29 static std::unique_ptr<const PdfFontMetricsStandard14>
Create(
31 static std::unique_ptr<const PdfFontMetricsStandard14>
Create(
35 static std::unique_ptr<const PdfFontMetricsStandard14>
Create(
39 bool HasUnicodeMapping()
const override;
41 bool TryGetGID(
char32_t codePoint,
unsigned&
gid)
const override;
45 bool TryGetBoundingBox(
Corners& value)
const override;
47 bool TryGetItalicAngle(
double& value)
const override;
49 bool TryGetAscent(
double& value)
const override;
51 bool TryGetDescent(
double& value)
const override;
53 bool TryGetCapHeight(
double& value)
const override;
55 bool TryGetStemV(
double& value)
const override;
57 double GetDefaultWidthRaw()
const override;
59 double GetLineSpacing()
const override;
61 double GetUnderlineThickness()
const override;
63 double GetUnderlinePosition()
const override;
65 double GetStrikeThroughPosition()
const override;
67 double GetStrikeThroughThickness()
const override;
69 std::string_view GetFontName()
const override;
71 std::string_view GetFontFamilyName()
const override;
73 PdfFontStretch GetFontStretch()
const override;
75 int GetWeightRaw()
const override;
77 double GetLeadingRaw()
const override;
79 double GetXHeightRaw()
const override;
81 double GetStemHRaw()
const override;
83 double GetAvgWidthRaw()
const override;
85 double GetMaxWidthRaw()
const override;
89 bool IsStandard14FontMetrics(PdfStandard14FontType&
std14Font)
const override;
91 unsigned GetFontFileLength1()
const override;
93 unsigned GetFontFileLength2()
const override;
95 unsigned GetFontFileLength3()
const override;
100 std::string_view GetBaseFontName()
const override;
102 unsigned GetGlyphCountFontProgram()
const override;
104 bool TryGetGlyphWidthFontProgram(
unsigned gid,
double&
width)
const override;
108 bool getIsItalicHint()
const override;
110 bool getIsBoldHint()
const override;
112 datahandle getFontFileDataHandle()
const override;
115 static std::unique_ptr<PdfFontMetricsStandard14> create(
119 static std::shared_ptr<const PdfFontMetricsStandard14> GetInstance(PdfStandard14FontType
std14Font);
122 PdfStandard14FontType m_Std14FontType;
125 double m_LineSpacing;
126 double m_UnderlineThickness;
127 double m_StrikeThroughThickness;
This file should be included as the FIRST file in every header of PoDoFo lib.
An unoriented rectangle defined by 2 points.
Definition Corners.h:16
This is the main class to handle the Standard14 metric data.
Definition PdfFontMetricsStandard14.h:19
Before you can draw text on a PDF document, you have to create a font object first.
Definition PdfFont.h:42
This class represents a PDF indirect Object in memory.
Definition PdfObject.h:31
Convenient type for char array storage and/or buffer with std::string compatibility.
Definition basetypes.h:30
A const data provider that can hold a view to a static segments or a shared buffer.
Definition basetypes.h:135
All classes, functions, types and enums of PoDoFo are members of these namespace.
Definition basetypes.h:13
PdfFontFileType
Definition PdfDeclarations.h:276
@ Create
Create a new file or truncate existing one for writing/reading.
PdfFontType
Enum specifying the type of the font.
Definition PdfDeclarations.h:266
PdfFontDescriptorFlags
Enum for the font descriptor flags.
Definition PdfDeclarations.h:233