27
27
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
30
/* Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved.
32
* The contents of this file are subject to the CID Font Code Public Licence
33
* Version 1.0 (the "License"). You may not use this file except in compliance
34
* with the Licence. You may obtain a copy of the License at Silicon Graphics,
35
* Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA
36
* 94043 or at http://www.sgi.com/software/opensource/cid/license.html.
38
* Software distributed under the License is distributed on an "AS IS" basis.
39
* ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED
40
* WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF
41
* NON-INFRINGEMENT. See the License for the specific language governing
42
* rights and limitations under the License.
44
* The Original Software is CID font code that was developed by Silicon
47
30
/* $XFree86: xc/lib/font/Type1/fontfcn.h,v 1.4 1999/08/22 08:58:50 dawes Exp $ */
54
33
/* modular config.h defines VERSION as libXfont version */
60
/* Definition of a PostScript CIDFont resource */
61
typedef struct cid_font {
66
spacerange *spacerangeP;
67
cidrange *notdefrangeP;
69
int binarydata; /* 1=binary data, 0=hex data */
71
psobj CIDFontFileName;
75
/* Definition of a PostScript CMap resource */
76
typedef struct cmap_res {
77
unsigned short firstCol;
78
unsigned short lastCol;
79
unsigned short firstRow;
80
unsigned short lastRow;
86
40
/* Definition of a PostScript FONT */
87
41
typedef struct ps_font {
98
52
/***================================================================***/
100
54
extern boolean Init_BuiltInEncoding ( void );
102
extern int scan_cidfont ( cidfont *CIDFontP, cmapres *CMapP );
103
extern int scan_cidtype1font ( psfont *FontP );
105
55
extern int scan_font ( psfont *FontP );
106
56
/***================================================================***/
107
57
/* Return codes from scan_font */
115
65
#define SCAN_FALSE -6
116
66
#define SCAN_END -7
119
/***================================================================***/
120
/* Name of CID FontInfo fields */
121
/***================================================================***/
123
#define CIDFONTNAME 2
124
#define CIDFONTTYPE 3
126
#define CIDREGISTRY 5
127
#define CIDORDERING 6
128
#define CIDSUPPLEMENT 7
129
#define CIDMAPOFFSET 8
131
#define CIDFDBYTES 10
132
#define CIDFONTBBOX 11
133
#define CIDFULLNAME 12
134
#define CIDFAMILYNAME 13
137
#define CIDGDBYTES 16
138
#define CIDUIDBASE 17
141
/***================================================================***/
142
/* Name of CMapInfo fields */
143
/***================================================================***/
144
#define CMAPREGISTRY 1
145
#define CMAPORDERING 2
146
#define CMAPSUPPLEMENT 3
148
#define CMAPVERSION 5
151
#define CMAPCIDCOUNT 8
154
68
/***================================================================***/
155
69
/* Name of FontInfo fields */
156
70
/***================================================================***/
192
106
#define RNDSTEMUP 15
193
107
#define EXPANSIONFACTOR 16
196
/***================================================================***/
197
/* Name of CID Type 1 Private values */
198
/***================================================================***/
199
#define CIDT1MINFEATURE 1
201
#define CIDT1LANGGROUP 3
202
#define CIDT1BLUEVALUES 4
203
#define CIDT1OTHERBLUES 5
204
#define CIDT1BLUESCALE 6
205
#define CIDT1BLUEFUZZ 7
206
#define CIDT1BLUESHIFT 8
207
#define CIDT1FAMBLUES 9
208
#define CIDT1FAMOTHERBLUES 10
209
#define CIDT1STDHW 11
210
#define CIDT1STDVW 12
211
#define CIDT1STEMSNAPH 13
212
#define CIDT1STEMSNAPV 14
213
#define CIDT1SUBMAPOFF 15
214
#define CIDT1SDBYTES 16
215
#define CIDT1SUBRCNT 17
216
#define CIDT1FORCEBOLD 18
217
#define CIDT1RNDSTEMUP 19
218
#define CIDT1EXPFACTOR 20
220
#define CID_BITMAP_UNDEFINED 0
221
109
extern int SearchDictName ( psdict *dictP, psobj *keyP );
223
extern boolean initCIDType1Font ( void );
225
110
extern boolean initFont ( int cnt );
227
extern int readCIDFont ( char *cidfontname, char *cmapfile );
228
extern int readCIDType1Font ( void );
230
111
extern int readFont ( char *env );
231
112
extern struct xobject *fontfcnB ( struct XYspace *S, unsigned char *code,
232
int *lenP, int *mode );
234
extern Bool CIDfontfcnA ( char *cidfontname, char *cmapfile, int *mode );
235
extern Bool CIDType1fontfcnA ( int *mode );
113
int *lenP, int *mode );
237
114
extern Bool fontfcnA ( char *env, int *mode );
239
extern void CIDQueryFontLib ( char *cidfontname, char *cmapfile,
240
char *infoName, pointer infoValue, int *rcodeP );
242
115
extern void QueryFontLib ( char *env, char *infoName, pointer infoValue,
245
extern struct xobject *CIDfontfcnC ( struct XYspace *S, psobj *theStringP,
247
struct blues_struct *BluesP, int *lenP,