7#ifndef PDF_FONT_METRICS_STANDARD14_H
8#define PDF_FONT_METRICS_STANDARD14_H
12#include "PdfFontMetrics.h"
13#include <podofo/auxiliary/Rect.h>
17struct Standard14FontData;
34 static std::unique_ptr<const PdfFontMetricsStandard14>
Create(
36 static std::unique_ptr<const PdfFontMetricsStandard14>
Create(
40 static std::unique_ptr<const PdfFontMetricsStandard14>
Create(
44 bool HasUnicodeMapping()
const override;
46 bool TryGetGID(
char32_t codePoint,
unsigned&
gid)
const override;
50 bool TryGetBoundingBox(
Corners& value)
const override;
52 bool TryGetItalicAngle(
double& value)
const override;
54 bool TryGetAscent(
double& value)
const override;
56 bool TryGetDescent(
double& value)
const override;
58 bool TryGetCapHeight(
double& value)
const override;
60 bool TryGetStemV(
double& value)
const override;
62 double GetDefaultWidthRaw()
const override;
64 double GetLineSpacing()
const override;
66 double GetUnderlineThickness()
const override;
68 double GetUnderlinePosition()
const override;
70 double GetStrikeThroughPosition()
const override;
72 double GetStrikeThroughThickness()
const override;
74 std::string_view GetFontName()
const override;
76 std::string_view GetFontFamilyName()
const override;
78 PdfFontStretch GetFontStretch()
const override;
80 int GetWeightRaw()
const override;
82 double GetLeadingRaw()
const override;
84 double GetXHeightRaw()
const override;
86 double GetStemHRaw()
const override;
88 double GetAvgWidthRaw()
const override;
90 double GetMaxWidthRaw()
const override;
94 bool IsStandard14FontMetrics(PdfStandard14FontType&
std14Font)
const override;
96 unsigned GetFontFileLength1()
const override;
98 unsigned GetFontFileLength2()
const override;
100 unsigned GetFontFileLength3()
const override;
105 std::string_view GetBaseFontName()
const override;
107 unsigned GetGlyphCountFontProgram()
const override;
109 bool TryGetGlyphWidthFontProgram(
unsigned gid,
double&
width)
const override;
111 bool getIsItalicHint()
const override;
113 bool getIsBoldHint()
const override;
115 datahandle getFontFileDataHandle()
const override;
118 static std::unique_ptr<PdfFontMetricsStandard14> create(
122 static std::shared_ptr<const PdfFontMetricsStandard14> GetInstance(PdfStandard14FontType
std14Font);
125 PdfStandard14FontType m_Std14FontType;
131 double m_LineSpacing;
132 double m_UnderlineThickness;
133 double m_UnderlinePosition;
134 double m_StrikeThroughThickness;
135 double m_StrikeThroughPosition;
SPDX-FileCopyrightText: (C) 2005 Dominik Seichter domseichter@web.de SPDX-FileCopyrightText: (C) 2020...
An unoriented rectangle defined by 2 points.
Definition Corners.h:20
This is the main class to handle the Standard14 metric data.
Definition PdfFontMetricsStandard14.h:23
Before you can draw text on a PDF document, you have to create a font object first.
Definition PdfFont.h:45
This class represents a PDF indirect Object in memory.
Definition PdfObject.h:35
Convenient type for char array storage and/or buffer with std::string compatibility.
Definition basetypes.h:38
A const data provider that can hold a view to a static segments or a shared buffer.
Definition basetypes.h:144
SPDX-FileCopyrightText: (C) 2022 Francesco Pretto ceztko@gmail.com SPDX-License-Identifier: LGPL-2....
Definition basetypes.h:16
PdfFontFileType
Definition PdfDeclarations.h:296
@ Create
Create a new file or truncate existing one for writing/reading.
PdfFontDescriptorFlags
Enum for the font descriptor flags.
Definition PdfDeclarations.h:252