Back to index

texmacs  1.0.7.15
pdffont.h
Go to the documentation of this file.
00001 /*  $Header: /home/cvsroot/dvipdfmx/src/pdffont.h,v 1.11 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 _PDFFONT_H_
00026 #define _PDFFONT_H_
00027 
00028 #include "pdfobj.h"
00029 #include "fontmap.h"
00030 #include "pdflimits.h"
00031 
00032 #define PDF_FONT_FONTTYPE_TYPE1    0
00033 #define PDF_FONT_FONTTYPE_TYPE1C   1
00034 #define PDF_FONT_FONTTYPE_TYPE3    2
00035 #define PDF_FONT_FONTTYPE_TRUETYPE 3
00036 
00037 #define PDF_FONT_FONTTYPE_TYPE0    4
00038 
00039 extern void pdf_font_set_verbose (void);
00040 extern int  pdf_font_get_verbose (void);
00041 
00042 extern void pdf_font_set_dpi (int font_dpi);
00043 
00044 #define PDF_FONT_FLAG_NOEMBED   (1 << 0)
00045 #define PDF_FONT_FLAG_COMPOSITE (1 << 1)
00046 #define PDF_FONT_FLAG_BASEFONT  (1 << 2)
00047 
00048 #define PDF_FONT_PARAM_DESIGN_SIZE 1
00049 #define PDF_FONT_PARAM_POINT_SIZE  2
00050 
00051 typedef struct pdf_font pdf_font;
00052 
00053 /* pdf_open_document() call them. */
00054 extern void     pdf_init_fonts  (void);
00055 extern void     pdf_close_fonts (void);
00056 
00057 /* font_name is used when mrec is NULL.
00058  * font_scale (point size) used by PK font.
00059  * It might be necessary if dvipdfmx supports font format with
00060  * various optical sizes supported in the future.
00061  */
00062 extern int      pdf_font_findresource  (const char *font_name,
00063                                    double font_scale, fontmap_rec *mrec);
00064 
00065 
00066 extern int       pdf_font_physical (const char *tex_name,
00067           double font_scale, const char *file_name, const char *tfm_file);
00068 
00069 
00070 extern int      pdf_get_font_subtype   (int font_id);
00071 extern pdf_obj *pdf_get_font_reference (int font_id);
00072 extern char    *pdf_get_font_usedchars (int font_id);
00073 
00074 #if 0
00075 extern char    *pdf_get_font_fontname  (int font_id); /* without unique tag */
00076 #endif
00077 extern int      pdf_get_font_encoding  (int font_id);
00078 extern int      pdf_get_font_wmode     (int font_id);
00079 
00080 
00081 /* Each font drivers use the followings. */
00082 extern int      pdf_font_is_in_use      (pdf_font *font);
00083 
00084 extern char    *pdf_font_get_ident      (pdf_font *font);
00085 extern char    *pdf_font_get_mapname    (pdf_font *font);
00086 extern char    *pdf_font_get_fontname   (pdf_font *font); /* without unique tag */
00087 extern char    *pdf_font_get_fontfile   (pdf_font *font);
00088 extern char    *pdf_font_get_tfmfile   (pdf_font *font);
00089 extern char    *pdf_font_get_uniqueTag  (pdf_font *font);
00090 
00091 extern pdf_obj *pdf_font_get_resource   (pdf_font *font);
00092 extern pdf_obj *pdf_font_get_descriptor (pdf_font *font);
00093 
00094 extern char    *pdf_font_get_usedchars  (pdf_font *font);
00095 extern int      pdf_font_get_encoding   (pdf_font *font);
00096 
00097 extern int      pdf_font_get_flag       (pdf_font *font, int mask);
00098 #if 0
00099 extern int      pdf_font_get_flags      (pdf_font *font);
00100 #endif
00101 extern double   pdf_font_get_param      (pdf_font *font, int type);
00102 
00103 extern int      pdf_font_get_index      (pdf_font *font);
00104 
00105 extern int      pdf_font_set_fontname   (pdf_font *font, const char *fontname);
00106 extern int      pdf_font_set_flags      (pdf_font *font, int flags);
00107 extern int      pdf_font_set_subtype    (pdf_font *font, int subtype);
00108 
00109 extern void     pdf_font_make_uniqueTag (char *tag);
00110 
00111 #endif /* _PDFFONT_H_ */