Back to index

texmacs  1.0.7.15
fontmap.h
Go to the documentation of this file.
00001 /*  $Header: /home/cvsroot/dvipdfmx/src/fontmap.h,v 1.23 2008/11/30 21:12:27 matthias 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     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 _FONTMAP_H_
00026 #define _FONTMAP_H_
00027 
00028 #define FONTMAP_RMODE_REPLACE  0
00029 #define FONTMAP_RMODE_APPEND  '+'
00030 #define FONTMAP_RMODE_REMOVE  '-'
00031 
00032 #define FONTMAP_OPT_NOEMBED (1 << 1)
00033 #define FONTMAP_OPT_VERT    (1 << 2)
00034 
00035 #define FONTMAP_STYLE_NONE       0
00036 #define FONTMAP_STYLE_BOLD       1
00037 #define FONTMAP_STYLE_ITALIC     2
00038 #define FONTMAP_STYLE_BOLDITALIC 3
00039 
00040 /* Options */
00041 typedef struct fontmap_opt {
00042   /* Synthetic font */
00043   double slant, extend, bold;
00044   /* comaptibility and other flags */
00045   long   mapc,  flags;
00046 
00047   char  *otl_tags;    /* currently unused */
00048   char  *tounicode;   /* not implemented yet */
00049 
00050   double design_size; /* unused */
00051 
00052   char  *charcoll;    /* Adobe-Japan1-4, etc. */
00053   int    index;       /* TTC index */
00054   int    style;       /* ,Bold, etc. */
00055   int    stemv;       /* StemV value especially for CJK fonts */
00056 } fontmap_opt;
00057 
00058 typedef struct fontmap_rec {
00059   char  *map_name;
00060 
00061   char  *font_name;
00062   char  *enc_name;
00063 
00064   /* Subfont mapping: translate 8-bit charcode to 16-bit charcode
00065    * via SFD.
00066    */
00067   struct {
00068     char  *sfd_name;
00069     char  *subfont_id;
00070   } charmap;
00071 
00072   fontmap_opt opt;
00073 } fontmap_rec;
00074 
00075 extern void         pdf_fontmap_set_verbose   (void);
00076 
00077 extern void         pdf_init_fontmaps         (void);
00078 #if 0
00079 extern void         pdf_clear_fontmaps        (void);
00080 #endif
00081 extern void         pdf_close_fontmaps        (void);
00082 
00083 extern void         pdf_init_fontmap_record   (fontmap_rec *mrec);
00084 extern void         pdf_clear_fontmap_record  (fontmap_rec *mrec);
00085 
00086 extern int          pdf_load_fontmap_file     (const char  *filename, int mode);
00087 extern int          pdf_read_fontmap_line     (fontmap_rec *mrec, const char *mline, long mline_strlen, int format);
00088 
00089 extern int          pdf_append_fontmap_record (const char  *kp, const fontmap_rec *mrec);
00090 extern int          pdf_remove_fontmap_record (const char  *kp);
00091 extern int          pdf_insert_fontmap_record (const char  *kp, const fontmap_rec *mrec);
00092 extern fontmap_rec *pdf_lookup_fontmap_record (const char  *kp);
00093 
00094 extern int          is_pdfm_mapline           (const char  *mline);
00095 
00096 #endif /* _FONTMAP_H_ */