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