Back to index

texmacs  1.0.7.15
tt_cmap.h
Go to the documentation of this file.
00001 /*  $Header: /home/cvsroot/dvipdfmx/src/tt_cmap.h,v 1.12 2004/09/11 14:50:29 hirata Exp $
00002     
00003     This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
00004 
00005     Copyright (C) 2002 by Jin-Hwan Cho and Shunsaku Hirata,
00006     the dvipdfmx project team <dvipdfmx@project.ktug.or.kr>
00007     
00008     This program is free software; you can redistribute it and/or modify
00009     it under the terms of the GNU General Public License as published by
00010     the Free Software Foundation; either version 2 of the License, or
00011     (at your option) any later version.
00012     
00013     This program is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016     GNU General Public License for more details.
00017     
00018     You should have received a copy of the GNU General Public License
00019     along with this program; if not, write to the Free Software
00020     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
00021 */
00022 
00023 #ifndef _TT_CMAP_H_
00024 #define _TT_CMAP_H_
00025 
00026 #include "sfnt.h"
00027 
00028 extern void otf_cmap_set_verbose (void);
00029 
00030 /* TrueType cmap table */
00031 typedef struct
00032 {
00033   USHORT format;
00034   USHORT platform;
00035   USHORT encoding;
00036   ULONG  language; /* or version, only for Mac */
00037   void  *map;
00038 } tt_cmap;
00039 
00040 /* Paltform ID */
00041 #define TT_MAC 1u
00042 #define TT_WIN 3u
00043 
00044 /* Platform-specific encoding ID */
00045 
00046 /* Windows */
00047 #define TT_WIN_SYMBOL  0u
00048 #define TT_WIN_UNICODE 1u
00049 #define TT_WIN_SJIS    2u
00050 #define TT_WIN_RPC     3u
00051 #define TT_WIN_BIG5    4u
00052 #define TT_WIN_WANSUNG 5u
00053 #define TT_WIN_JOHAB   6u
00054 #define TT_WIN_UCS4    10u
00055 
00056 /* Mac */
00057 #define TT_MAC_ROMAN               0u
00058 #define TT_MAC_JAPANESE            1u
00059 #define TT_MAC_TRADITIONAL_CHINESE 2u
00060 #define TT_MAC_KOREAN              3u
00061 #define TT_MAC_SIMPLIFIED_CHINESE  25u
00062 
00063 extern tt_cmap *tt_cmap_read    (sfnt *sfont, USHORT platform, USHORT encoding);
00064 
00065 extern USHORT   tt_cmap_lookup  (tt_cmap *cmap, long cc);
00066 extern void     tt_cmap_release (tt_cmap *cmap);
00067 
00068 #include "pdfobj.h"
00069 
00070 /* Indirect reference */
00071 extern pdf_obj *otf_create_ToUnicode_stream (const char *map_name,
00072                                         int ttc_index,
00073                                         const char *used_glyphs);
00074 /* CMap ID */
00075 extern int      otf_load_Unicode_CMap       (const char *map_name,
00076                                         int ttc_index,
00077                                         const char *otl_opts, int wmode);
00078 
00079 #endif /* _TT_CMAP_H_ */