OSDN Git Service

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