wxMaxima
Loading...
Searching...
No Matches
pdfencoding.h
Go to the documentation of this file.
1
2// Name: pdfencoding.h
3// Purpose:
4// Author: Ulrich Telle
5// Created: 2009-05-30
6// Copyright: (c) Ulrich Telle
7// Licence: wxWindows licence
9
11
12#ifndef _PDF_ENCODING_H_
13#define _PDF_ENCODING_H_
14
15// wxWidgets headers
16#include <wx/string.h>
17
18// wxPdfDocument headers
19#include "wx/pdfdocdef.h"
20#include "wx/pdfarraytypes.h"
21#include "wx/pdffontdata.h"
22
24class WXDLLIMPEXP_PDFDOC wxPdfEncoding
25{
26public:
29
31 virtual ~wxPdfEncoding();
32
34
37 wxPdfEncoding(const wxPdfEncoding& encoding);
38
40
44 wxPdfEncoding& operator=(const wxPdfEncoding& encoding);
45
47
50 bool IsOk() const;
51
53
56 bool SetEncoding(const wxString& encoding);
57
59
62 wxString GetEncodingName() const;
63
65
68 wxString GetBaseEncodingName() const;
69
71
74 wxString GetDifferences() const;
75
77
80 wxPdfArrayUint32 GetCMap() const;
81
83
86 void InitializeEncodingMap();
87
89
92 const wxPdfChar2GlyphMap* GetEncodingMap() const;
93
95
98 wxArrayString GetGlyphNames() const;
99
101
106 static bool GlyphName2Unicode(const wxString& glyphName, wxUint32& unicode);
107
109
114 static bool Unicode2GlyphName(wxUint32 unicode, wxString& glyphName);
115
117
120 static wxArrayString GetKnownEncodings();
121
122protected:
124 void CreateEncodingConvMap();
125
126private:
127 wxString m_encoding;
128 wxString m_baseEncoding;
129 wxPdfArrayUint32 m_cmap;
130 wxPdfArrayUint32 m_cmapBase;
131 wxArrayString m_glyphNames;
132 bool m_specific;
133 int m_firstChar;
134 int m_lastChar;
135 wxPdfChar2GlyphMap* m_encodingMap;
136};
137
139class WXDLLIMPEXP_PDFDOC wxPdfEncodingChecker
140{
141public:
144
146 virtual ~wxPdfEncodingChecker();
147
149
152 wxString GetEncodingName() const;
153
155
159 virtual bool IsIncluded(wxUint32 unicode) const = 0;
160
161protected:
162 wxString m_encoding;
163};
164
165#endif
Class representing a font encoding checker.
Definition: pdfencoding.h:140
virtual bool IsIncluded(wxUint32 unicode) const =0
Check whether a given Unicode character is included in the encoding.
wxString m_encoding
name of the encoding
Definition: pdfencoding.h:162
Class representing a font encoding.
Definition: pdfencoding.h:25
Definition of array types.
Compile time switches for the wxPdfDocument component.
Definition of font data.