wxMaxima
Loading...
Searching...
No Matches
pdfcffdecoder.h
Go to the documentation of this file.
1
2// Name: pdfcffdecoder.h
3// Purpose:
4// Author: Ulrich Telle
5// Created: 2008-08-01
6// Copyright: (c) Ulrich Telle
7// Licence: wxWindows licence
9
11
12#ifndef _PDF_CFF_DECODER_H_
13#define _PDF_CFF_DECODER_H_
14
15// wxWidgets headers
16#include <wx/dynarray.h>
17#include <wx/string.h>
18#include <wx/mstream.h>
19#include <wx/wfstream.h>
20
21// wxPdfDocument headers
22#include "wx/pdfdocdef.h"
23#include "wx/pdfarraytypes.h"
24#include "wx/pdfcffindex.h"
25
26const int NUM_STD_STRINGS = 391;
27const char SUBR_RETURN_OP = 11;
28
29// Forward declaration of internal classes
31
34class WXDLLIMPEXP_PDFDOC wxPdfCffDecoder
35{
36public:
39
41
46 wxPdfCffDecoder(wxPdfCffIndexArray* globalSubrIndex,
47 wxPdfSortedArrayInt* hGlobalSubrsUsed,
48 wxArrayInt* lGlobalSubrsUsed);
49
51 virtual ~wxPdfCffDecoder();
52
54
62 bool GetCharWidthAndComposite(wxPdfCffIndexElement& charstring, int& width, bool& isComposite, int& bchar, int& achar);
63
65
69 int CalcBias(int nSubrs);
70
72
82 void ReadASubr(wxInputStream* stream, int begin, int end,
83 int globalBias, int localBias,
84 wxPdfSortedArrayInt& hSubrsUsed, wxArrayInt& lSubrsUsed,
85 wxPdfCffIndexArray& localSubIndex);
86
87protected:
89 unsigned char ReadByte(wxInputStream* stream);
90
92 short ReadShort(wxInputStream* stream);
93
95 int ReadInt(wxInputStream* stream);
96
98 void HandleStack();
99
101 int StackOpp();
102
104 void EmptyStack();
105
107 void PopStack();
108
110 void PushStack();
111
113 void ReadCommand(wxInputStream* stream);
114
116 int CalcHints(wxInputStream* stream, int begin, int end, int globalBias, int localBias, wxPdfCffIndexArray& localSubIndex);
117
118private:
119 wxPdfCffIndexArray* m_globalSubrIndex;
120
121 int m_charstringType;
122
123 wxString m_key;
124 wxPdfCffFontObject* m_args;
125 int m_argCount;
126
127 int m_numHints;
128
129 wxPdfSortedArrayInt* m_hGlobalSubrsUsed;
130 wxArrayInt* m_lGlobalSubrsUsed;
131};
132
133#endif
Class representing CFF decoder for charstrings of type 1 and 2. (For internal use only)
Definition: pdfcffdecoder.h:35
Definition: pdfcffdecoder.cpp:197
Class representing a CFF index element.
Definition: pdfcffindex.h:24
Definition of array types.
Interface of the index structure for CFF fonts.
Compile time switches for the wxPdfDocument component.