wxMaxima
Loading...
Searching...
No Matches
pdffontextended.h
Go to the documentation of this file.
1
2// Name: pdffontextended.h
3// Purpose:
4// Author: Ulrich Telle
5// Created: 2009-02-26
6// Copyright: (c) Ulrich Telle
7// Licence: wxWindows licence
9
11
12#ifndef _PDF_FONT_EXTENDED_H_
13#define _PDF_FONT_EXTENDED_H_
14
15// wxWidgets headers
16#include <wx/mstream.h>
17#include <wx/string.h>
18
19// wxPdfDocument headers
20#include "wx/pdfdocdef.h"
21#include "wx/pdfarraytypes.h"
22#include "wx/pdffontdata.h"
23
24class WXDLLIMPEXP_FWD_PDFDOC wxPdfEncoding;
25class WXDLLIMPEXP_FWD_PDFDOC wxPdfFont;
26class WXDLLIMPEXP_FWD_PDFDOC wxPdfFontDescription;
27
29class WXDLLIMPEXP_PDFDOC wxPdfFontExtended
30{
31public:
34
36
39 wxPdfFontExtended(const wxPdfFont& font);
40
42 virtual ~wxPdfFontExtended() ;
43
46
48 wxPdfFontExtended& operator=(const wxPdfFontExtended& font);
49
51
54 bool IsValid() const;
55
57
60 wxString GetType() const;
61
63
66 wxString GetFamily() const;
67
69
72 wxString GetName() const;
73
75
78 int GetStyle() const;
79
81
84 bool EmbedRequested() const { return m_embed; }
85
87
90 bool SubsetRequested() const { return m_subset; }
91
93
96 int GetUnderlinePosition() const;
97
99
102 int GetUnderlineThickness() const;
103
105
108 int GetBBoxTopPosition() const;
109
111
114 wxString GetEncoding() const;
115
117
120 wxString GetBaseEncoding() const;
121
123
126 bool HasDiffs() const;
127
129
132 wxString GetDiffs() const;
133
135
138 size_t GetSize1() const;
139
141
145 bool HasSize2() const;
146
148
152 size_t GetSize2() const;
153
155
158 wxString GetCMap() const;
159
161
164 wxString GetOrdering() const;
165
167
170 wxString GetSupplement() const;
171
173
179 wxString GetWidthsAsString(bool subset = false, wxPdfSortedArrayInt* usedGlyphs = NULL, wxPdfChar2GlyphMap* subsetGlyphs = NULL) const;
180
182
188 double GetStringWidth(const wxString& s, bool withKerning = false, double charSpacing = 0);
189
191
198 wxArrayInt GetKerningWidthArray(const wxString& s) const;
199
201
205 bool CanShow(const wxString& s) const;
206
208
214 wxString ConvertCID2GID(const wxString& s, wxPdfSortedArrayInt* usedGlyphs = NULL, wxPdfChar2GlyphMap* subsetGlyphs = NULL);
215
217
223 wxString ConvertGlyph(wxUint32 glyph, wxPdfSortedArrayInt* usedGlyphs = NULL, wxPdfChar2GlyphMap* subsetGlyphs = NULL);
224
226
229 bool IsEmbedded() const;
230
232
235 bool SupportsSubset() const;
236
238
244 size_t WriteFontData(wxOutputStream* fontData, wxPdfSortedArrayInt* usedGlyphs, wxPdfChar2GlyphMap* subsetGlyphs);
245
247
253 size_t WriteUnicodeMap(wxOutputStream* mapData, wxPdfSortedArrayInt* usedGlyphs, wxPdfChar2GlyphMap* subsetGlyphs);
254
256
262 size_t WriteCIDToGIDMap(wxOutputStream* mapData, wxPdfSortedArrayInt* usedGlyphs, wxPdfChar2GlyphMap* subsetGlyphs);
263
265
271 size_t WriteCIDSet(wxOutputStream* setData, wxPdfSortedArrayInt* usedGlyphs, wxPdfChar2GlyphMap* subsetGlyphs);
272
274 const wxPdfFontDescription& GetDescription() const;
275
277
280 wxPdfFont GetUserFont() const;
281
283
286 bool HasEncodingMap() const;
287
288#if wxUSE_UNICODE
290
293 virtual wxMBConv* GetEncodingConv() const;
294#endif
295
300 bool HasVoltData() const;
301
310 wxString ApplyVoltData(const wxString& txt) const;
311
312protected:
313
314private:
315 // Constructor
316 wxPdfFontExtended(const wxPdfFontData* fontData);
317
318 bool m_embed;
319 bool m_subset;
320 int m_fontStyle;
321 wxPdfFontData* m_fontData;
322 const wxPdfEncoding* m_encoding;
323
324 friend class wxPdfFontManagerBase;
325};
326
327#endif
Class representing a font encoding.
Definition: pdfencoding.h:25
Base class for all fonts. (For internal use only)
Definition: pdffontdata.h:55
Class representing a font description.
Definition: pdffontdescription.h:24
Class representing a font providing an extended interface.
Definition: pdffontextended.h:30
bool SubsetRequested() const
Check whether font subsetting is requested for this font.
Definition: pdffontextended.h:90
bool EmbedRequested() const
Check whether font embedding is requested for this font.
Definition: pdffontextended.h:84
Definition: pdffontmanager.cpp:301
Class representing a font providing a basic interface.
Definition: pdffont.h:29
Definition of array types.
Compile time switches for the wxPdfDocument component.
Definition of font data.