src/vf.h

/* [<][>]
[^][v][top][bottom][index][help] */

FUNCTIONS

This source file includes following functions.

   1 /*
   2  * vf.h - A vf (virtual font) interface
   3  * by Hirotsugu Kakugawa
   4  *
   5  * 30 Jan 1997  First implementation.
   6  *  7 Aug 1997  VFlib 3.3  Changed API.
   7  *  2 Feb 1998  VFlib 3.4
   8  *
   9  */
  10 /*
  11  * Copyright (C) 1997-1998  Hirotsugu Kakugawa. 
  12  * All rights reserved.
  13  *
  14  * This file is part of the VFlib Library.  This library is free
  15  * software; you can redistribute it and/or modify it under the terms of
  16  * the GNU Library General Public License as published by the Free
  17  * Software Foundation; either version 2 of the License, or (at your
  18  * option) any later version.  This library is distributed in the hope
  19  * that it will be useful, but WITHOUT ANY WARRANTY; without even the
  20  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  21  * PURPOSE.  See the GNU Library General Public License for more details.
  22  * You should have received a copy of the GNU Library General Public
  23  * License along with this library; if not, write to the Free Software
  24  * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  25  */
  26 
  27 
  28 #ifndef __VFLIB_VF_H__
  29 #define __VFLIB_VF_H__
  30 
  31 
  32 #ifndef VF_CACHE_SIZE
  33 #  define VF_CACHE_SIZE  16
  34 #endif
  35 #ifndef VF_HASH_SIZE
  36 #  define VF_HASH_SIZE   7
  37 #endif
  38 
  39 
  40 struct s_vf_char_packet {
  41   UINT4         pl;
  42   UINT4         cc;
  43   UINT4         tfm;
  44   unsigned char *dvi;
  45 };
  46 typedef struct s_vf_char_packet  *VF_CHAR_PACKET;
  47 struct s_vf_char_packet_tbl {
  48   int                npackets;
  49   VF_CHAR_PACKET     packets;
  50 };  
  51 typedef struct s_vf_char_packet_tbl  *VF_CHAR_PACKET_TBL;
  52 
  53 struct s_vf_subfont {
  54   UINT4         k;
  55   UINT4         s;
  56   UINT4         d;
  57   UINT4         a;
  58   UINT4         l;
  59   char          *n;
  60   int           font_id;  /* font id in VFlib */
  61   struct s_vf_subfont *next;
  62 };
  63 typedef struct s_vf_subfont  *VF_SUBFONT;
  64 
  65 
  66 struct s_vf {
  67   char        *vf_path;
  68   UINT4       cs;
  69   UINT4       ds; 
  70   double      design_size;
  71   double      point_size;
  72   double      dpi_x, dpi_y;
  73   double      mag_x, mag_y;
  74   /* TFM */
  75   char        *tfm_path;
  76   TFM         tfm;
  77   /* subfotns */
  78   struct s_vf_subfont  *subfonts;
  79   int                  subfonts_opened;
  80   int                  default_subfont;
  81   /* file offset to character packets (offset in vf file) */
  82   long                 offs_char_packet;
  83 };
  84 typedef struct s_vf  *VF;
  85 
  86 
  87 struct s_vf_cache_key {
  88   char    *font_path;
  89   TFM     tfm;
  90   long    offs_char_packet;
  91 };
  92 typedef struct s_vf_cache_key  *VF_CACHE_KEY;
  93 
  94 
  95 #define  VFINST_ID_BYTE           202
  96 #define  VFINST_CP_SHORT_CHAR0      0
  97 #define  VFINST_CP_SHORT_CHAR241  241
  98 #define  VFINST_CP_LONG_CHAR      242
  99 
 100 #define  VFINST_SETCHAR0        0
 101 #define  VFINST_SETCHAR127    127
 102 #define  VFINST_SET1          128
 103 #define  VFINST_SET2          129
 104 #define  VFINST_SET3          130
 105 #define  VFINST_SET4          131
 106 #define  VFINST_SETRULE       132
 107 #define  VFINST_PUT1          133
 108 #define  VFINST_PUT2          134
 109 #define  VFINST_PUT3          135
 110 #define  VFINST_PUT4          136
 111 #define  VFINST_PUTRULE       137
 112 #define  VFINST_NOP           138
 113 #define  VFINST_PUSH          141
 114 #define  VFINST_POP           142
 115 #define  VFINST_RIGHT1        143
 116 #define  VFINST_RIGHT2        144
 117 #define  VFINST_RIGHT3        145
 118 #define  VFINST_RIGHT4        146
 119 #define  VFINST_W0            147
 120 #define  VFINST_W1            148
 121 #define  VFINST_W2            149
 122 #define  VFINST_W3            150
 123 #define  VFINST_W4            151
 124 #define  VFINST_X0            152
 125 #define  VFINST_X1            153
 126 #define  VFINST_X2            154
 127 #define  VFINST_X3            155
 128 #define  VFINST_X4            156
 129 #define  VFINST_DOWN1         157
 130 #define  VFINST_DOWN2         158
 131 #define  VFINST_DOWN3         159
 132 #define  VFINST_DOWN4         160
 133 #define  VFINST_Y0            161
 134 #define  VFINST_Y1            162
 135 #define  VFINST_Y2            163
 136 #define  VFINST_Y3            164
 137 #define  VFINST_Y4            165
 138 #define  VFINST_Z0            166
 139 #define  VFINST_Z1            167
 140 #define  VFINST_Z2            168
 141 #define  VFINST_Z3            169
 142 #define  VFINST_Z4            170
 143 #define  VFINST_FNTNUM0       171
 144 #define  VFINST_FNTNUM63      234
 145 #define  VFINST_FNT1          235
 146 #define  VFINST_FNT2          236
 147 #define  VFINST_FNT3          237
 148 #define  VFINST_FNT4          238
 149 #define  VFINST_XXX1          239
 150 #define  VFINST_XXX2          240
 151 #define  VFINST_XXX3          241
 152 #define  VFINST_XXX4          242
 153 #define  VFINST_FNTDEF1       243
 154 #define  VFINST_FNTDEF2       244
 155 #define  VFINST_FNTDEF3       245
 156 #define  VFINST_FNTDEF4       246
 157 #define  VFINST_PRE           247
 158 #define  VFINST_POST          248
 159 
 160 
 161 #endif /*__VFLIB_VF_H__*/
 162 
 163 /*EOF*/

/* [<][>][^][v][top][bottom][index][help] */