| 1 |
/* $XConsortium: fontfcn.h,v 1.3 92/03/26 16:42:23 eswu Exp $ */ |
| 2 |
/* Copyright International Business Machines,Corp. 1991 |
| 3 |
* All Rights Reserved |
| 4 |
* |
| 5 |
* License to use, copy, modify, and distribute this software |
| 6 |
* and its documentation for any purpose and without fee is |
| 7 |
* hereby granted, provided that the above copyright notice |
| 8 |
* appear in all copies and that both that copyright notice and |
| 9 |
* this permission notice appear in supporting documentation, |
| 10 |
* and that the name of IBM not be used in advertising or |
| 11 |
* publicity pertaining to distribution of the software without |
| 12 |
* specific, written prior permission. |
| 13 |
* |
| 14 |
* IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES |
| 15 |
* OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT |
| 16 |
* LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, |
| 17 |
* FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF |
| 18 |
* THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND |
| 19 |
* PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT |
| 20 |
* OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF |
| 21 |
* THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES |
| 22 |
* THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN |
| 23 |
* NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR |
| 24 |
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING |
| 25 |
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF |
| 26 |
* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT |
| 27 |
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS |
| 28 |
* SOFTWARE. |
| 29 |
*/ |
| 30 |
/* Definition of a PostScript FONT */ |
| 31 |
typedef struct ps_font { |
| 32 |
char *vm_start; |
| 33 |
psobj FontFileName; |
| 34 |
psobj Subrs; |
| 35 |
psdict *CharStringsP; |
| 36 |
psdict *Private; |
| 37 |
psdict *fontInfoP; |
| 38 |
struct blues_struct *BluesP; |
| 39 |
} psfont; |
| 40 |
/***================================================================***/ |
| 41 |
/* Globals */ |
| 42 |
/***================================================================***/ |
| 43 |
|
| 44 |
extern int currentchar; /* for error reporting */ |
| 45 |
/***================================================================***/ |
| 46 |
/* Routines in scan_font */ |
| 47 |
/***================================================================***/ |
| 48 |
|
| 49 |
extern boolean Init_BuiltInEncoding(void); |
| 50 |
extern int SearchDictName(psdict *, psobj *); |
| 51 |
extern int scan_font(psfont *); |
| 52 |
extern struct xobject *Type1Char(psfont *, struct XYspace *, psobj *, psobj *, |
| 53 |
psobj *, struct blues_struct *, int *); |
| 54 |
extern void objFormatName(psobj *, int, const char *); |
| 55 |
extern Bool fontfcnA(char *env,int *mode); |
| 56 |
extern struct region *fontfcnB(struct XYspace *S, unsigned char *code, |
| 57 |
int *lenP, int *mode); |
| 58 |
/***================================================================***/ |
| 59 |
/* Entry point for Type1Char to get entry from CharStrings */ |
| 60 |
/***================================================================***/ |
| 61 |
extern psobj *GetType1CharString(psfont *, unsigned char); |
| 62 |
|
| 63 |
extern int Type1OpenScalable(encoding, FontPtr *, int, FontEntryPtr, char *, |
| 64 |
FontScalablePtr, fsBitmapFormat, |
| 65 |
fsBitmapFormatMask, DOUBLE, DOUBLE); |
| 66 |
extern void Type1RegisterFontFileFunctions(void); |
| 67 |
extern void Type1CloseFont(FontPtr); |
| 68 |
extern int CheckFSFormat(int format,int fmask,int *bit,int *byte,int *scan,int *glyph,int *image); |
| 69 |
|
| 70 |
/***================================================================***/ |
| 71 |
/* Return codes from scan_font */ |
| 72 |
/***================================================================***/ |
| 73 |
#define SCAN_OK 0 |
| 74 |
#define SCAN_FILE_EOF -1 |
| 75 |
#define SCAN_ERROR -2 |
| 76 |
#define SCAN_OUT_OF_MEMORY -3 |
| 77 |
#define SCAN_FILE_OPEN_ERROR -4 |
| 78 |
#define SCAN_TRUE -5 |
| 79 |
#define SCAN_FALSE -6 |
| 80 |
#define SCAN_END -7 |
| 81 |
|
| 82 |
/***================================================================***/ |
| 83 |
/* Name of FontInfo fields */ |
| 84 |
/***================================================================***/ |
| 85 |
|
| 86 |
#define FONTNAME 1 |
| 87 |
#define PAINTTYPE 2 |
| 88 |
#define FONTTYPENUM 3 |
| 89 |
#define FONTMATRIX 4 |
| 90 |
#define FONTBBOX 5 |
| 91 |
#define UNIQUEID 6 |
| 92 |
#define STROKEWIDTH 7 |
| 93 |
#define VERSION 8 |
| 94 |
#define NOTICE 9 |
| 95 |
#define FULLNAME 10 |
| 96 |
#define FAMILYNAME 11 |
| 97 |
#define WEIGHT 12 |
| 98 |
#define ITALICANGLE 13 |
| 99 |
#define ISFIXEDPITCH 14 |
| 100 |
#define UNDERLINEPOSITION 15 |
| 101 |
#define UNDERLINETHICKNESS 16 |
| 102 |
#define ENCODING 17 |
| 103 |
/***================================================================***/ |
| 104 |
/* Name of Private values */ |
| 105 |
/***================================================================***/ |
| 106 |
#define BLUEVALUES 1 |
| 107 |
#define OTHERBLUES 2 |
| 108 |
#define FAMILYBLUES 3 |
| 109 |
#define FAMILYOTHERBLUES 4 |
| 110 |
#define BLUESCALE 5 |
| 111 |
#define BLUESHIFT 6 |
| 112 |
#define BLUEFUZZ 7 |
| 113 |
#define STDHW 8 |
| 114 |
#define STDVW 9 |
| 115 |
#define STEMSNAPH 10 |
| 116 |
#define STEMSNAPV 11 |
| 117 |
#define FORCEBOLD 12 |
| 118 |
#define LANGUAGEGROUP 13 |
| 119 |
#define LENIV 14 |
| 120 |
#define RNDSTEMUP 15 |
| 121 |
#define EXPANSIONFACTOR 16 |