Back to index

texmacs  1.0.7.15
pdfencoding.h
Go to the documentation of this file.
00001 /*  $Header: /home/cvsroot/dvipdfmx/src/pdfencoding.h,v 1.4 2007/11/14 03:12:21 chofchof Exp $
00002     
00003     This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
00004 
00005     Copyright (C) 2007 by Jin-Hwan Cho and Shunsaku Hirata,
00006     the dvipdfmx project team <dvipdfmx@project.ktug.or.kr>
00007     
00008     Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks@kettering.edu>
00009 
00010     This program is free software; you can redistribute it and/or modify
00011     it under the terms of the GNU General Public License as published by
00012     the Free Software Foundation; either version 2 of the License, or
00013     (at your option) any later version.
00014     
00015     This program is distributed in the hope that it will be useful,
00016     but WITHOUT ANY WARRANTY; without even the implied warranty of
00017     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018     GNU General Public License for more details.
00019     
00020     You should have received a copy of the GNU General Public License
00021     along with this program; if not, write to the Free Software
00022     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
00023 */
00024 
00025 #ifndef _PDFENCODING_H_
00026 #define _PDFENCODING_H_
00027 
00028 #include "pdfobj.h"
00029 
00030 extern void      pdf_encoding_set_verbose    (void);
00031 
00032 extern void      pdf_init_encodings          (void);
00033 extern void      pdf_close_encodings         (void);
00034 
00035 /* Creates Encoding resource and ToUnicode CMap 
00036  * for all non-predefined encodings.
00037  */
00038 extern void      pdf_encoding_complete       (void);
00039 
00040 /* enc_name here is .enc file name or the name of predefined
00041  * encodings.
00042  */
00043 extern int       pdf_encoding_findresource   (char *enc_name);
00044 
00045 /* Returns the Encoding resource object.
00046  */
00047 extern pdf_obj  *pdf_get_encoding_obj        (int enc_id);
00048 
00049 extern int       pdf_encoding_is_predefined  (int enc_id);
00050 extern void      pdf_encoding_used_by_type3  (int enc_id);
00051 
00052 /* WARNING:
00053  * Pointer(s) may change after another encoding is loaded.
00054  */
00055 extern char     *pdf_encoding_get_name       (int enc_id);
00056 extern char    **pdf_encoding_get_encoding   (int enc_id);
00057 
00058 /* 
00059  * pdf_create_ToUnicode_CMap() returns stream object but not
00060  * reference. This need to be renamed to other name like
00061  * pdf_create_ToUnicode_stream().
00062  */
00063 extern pdf_obj  *pdf_create_ToUnicode_CMap   (const char *enc_name,
00064                                          char **enc_vec,
00065                                          const char *is_used);
00066 
00067 /* pdf_encoding_copy_usedchars adds the given vector of used characters
00068  * to the corresponding vector of the encoding.
00069  */
00070 extern void      pdf_encoding_add_usedchars (int encoding_id,
00071                                          const char *is_used);
00072 
00073 extern pdf_obj * pdf_encoding_get_tounicode  (int encoding_id);
00074 
00075 /* Just load CMap identified with 'ident'. (parsed)
00076  * PDF stream object (not reference) returned.
00077  */ 
00078 extern pdf_obj  *pdf_load_ToUnicode_stream   (const char *ident);
00079 
00080 #endif /* _PDFENCODINGS_H_ */