wxMaxima
Loading...
Searching...
No Matches
pdffont.h
Go to the documentation of this file.
1
2// Name: pdffont.h
3// Purpose:
4// Author: Ulrich Telle
5// Created: 2008-08-10
6// Copyright: (c) Ulrich Telle
7// Licence: wxWindows licence
9
11
12#ifndef PDF_FONT_H_
13#define PDF_FONT_H_
14
15// wxWidgets headers
16#include <wx/mstream.h>
17
18// wxPdfDocument headers
19#include "wx/pdfdocdef.h"
20#include "wx/pdfarraytypes.h"
22#include "wx/pdfproperties.h"
23
24class WXDLLIMPEXP_FWD_PDFDOC wxPdfEncoding;
25class WXDLLIMPEXP_FWD_PDFDOC wxPdfFontData;
26
28class WXDLLIMPEXP_PDFDOC wxPdfFont
29{
30public :
32 wxPdfFont() ;
33
35 virtual ~wxPdfFont() ;
36
38
41 wxPdfFont(const wxPdfFont& font);
42
44
48 wxPdfFont& operator=(const wxPdfFont& 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 wxString GetEncoding() const;
85
87
91 virtual double GetStringWidth(const wxString& s) const;
92
94
97 bool EmbedRequired() const;
98
100
103 bool EmbedSupported() const;
104
106
109 bool SubsetSupported() const;
110
112
115 const wxPdfFontDescription GetDescription() const;
116
118
125 void SetEmbed(bool embed);
126
128
132 bool GetEmbed() const { return m_embed; }
133
135
141 void SetSubset(bool subset);
142
144
148 bool GetSubset() const { return m_subset; }
149
151
159 bool SetEncoding(const wxString& encodingName);
160
162
169 bool GetEncoding(wxPdfEncoding& encoding);
170
172
176 bool CanShow(const wxString& s);
177
179
184 bool GetSupportedUnicodeCharacters(wxPdfArrayUint32& unicodeCharacters) const;
185
187
194 wxString ConvertToValid(const wxString& s, wxUniChar replace = wxS('?')) const;
195
197
202 bool GetGlyphNames(wxArrayString& glyphNames) const;
203
204private:
206
210 wxPdfFont(wxPdfFontData* fontData, int fontStyle = wxPDF_FONTSTYLE_REGULAR);
211
212 bool m_embed;
213 bool m_subset;
214 int m_fontStyle;
215 wxPdfFontData* m_fontData;
216 const wxPdfEncoding* m_encoding;
217
218 friend class wxPdfFontExtended;
219 friend class wxPdfFontManagerBase;
220};
221
222#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
Definition: pdffontmanager.cpp:301
Class representing a font providing a basic interface.
Definition: pdffont.h:29
bool GetEmbed() const
Get embed flag.
Definition: pdffont.h:132
bool GetSubset() const
Get subset flag.
Definition: pdffont.h:148
Definition of array types.
Compile time switches for the wxPdfDocument component.
Interface of the wxPdfFontDescription class.
Interface of the several wxPdfDocument property classes.
@ wxPDF_FONTSTYLE_REGULAR
Regular font style.
Definition: pdfproperties.h:55