]>
git.ipfire.org Git - thirdparty/cups.git/blob - pdftops/FontEncoding.h
1 //========================================================================
5 // Copyright 1999 Derek B. Noonburg
7 //========================================================================
10 #define FONTENCODING_H
18 //------------------------------------------------------------------------
20 //------------------------------------------------------------------------
22 #define fontEncHashSize 419
27 // Construct an empty encoding.
30 // Construct an encoding from an array of char names.
31 FontEncoding(char **encodingA
, int sizeA
);
36 // Create a copy of the encoding.
37 FontEncoding
*copy() { return new FontEncoding(this); }
39 // Return number of codes in encoding, i.e., max code + 1.
40 int getSize() { return size
; }
42 // Add a char to the encoding.
43 void addChar(int code
, char *name
);
45 // Return the character name associated with <code>.
46 char *getCharName(int code
) { return encoding
[code
]; }
48 // Return the code associated with <name>.
49 int getCharCode(char *name
);
53 FontEncoding(FontEncoding
*fontEnc
);
55 void addChar1(int code
, char *name
);
57 char **encoding
; // code --> name mapping
58 int size
; // number of codes
59 GBool freeEnc
; // should we free the encoding array?
60 short // name --> code hash table
61 hashTab
[fontEncHashSize
];