1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
/*
This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
Copyright (C) 2007-2012 by Jin-Hwan Cho and Shunsaku Hirata,
the dvipdfmx project team.
Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks@kettering.edu>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#ifndef _PDFENCODING_H_
#define _PDFENCODING_H_
#include "pdfobj.h"
extern void pdf_encoding_set_verbose (void);
extern void pdf_init_encodings (void);
extern void pdf_close_encodings (void);
/* Creates Encoding resource and ToUnicode CMap
* for all non-predefined encodings.
*/
extern void pdf_encoding_complete (void);
/* enc_name here is .enc file name or the name of predefined
* encodings.
*/
extern int pdf_encoding_findresource (const char *enc_name);
/* Returns the Encoding resource object.
*/
extern pdf_obj *pdf_get_encoding_obj (int enc_id);
extern int pdf_encoding_is_predefined (int enc_id);
extern void pdf_encoding_used_by_type3 (int enc_id);
/* WARNING:
* Pointer(s) may change after another encoding is loaded.
*/
extern char *pdf_encoding_get_name (int enc_id);
extern char **pdf_encoding_get_encoding (int enc_id);
/*
* pdf_create_ToUnicode_CMap() returns stream object but not
* reference. This need to be renamed to other name like
* pdf_create_ToUnicode_stream().
*/
extern pdf_obj *pdf_create_ToUnicode_CMap (const char *enc_name,
char **enc_vec,
const char *is_used);
/* pdf_encoding_copy_usedchars adds the given vector of used characters
* to the corresponding vector of the encoding.
*/
extern void pdf_encoding_add_usedchars (int encoding_id,
const char *is_used);
extern pdf_obj * pdf_encoding_get_tounicode (int encoding_id);
/* Just load CMap identified with 'ident'. (parsed)
* PDF stream object (not reference) returned.
*/
extern pdf_obj *pdf_load_ToUnicode_stream (const char *ident);
#endif /* _PDFENCODINGS_H_ */
|