1
/*--------------------------------------------------------------------------
3
----- Author: Rainer Menzner (Rainer.Menzner@web.de)
5
----- Description: This file is part of the t1-library. It contains
6
global declarations used by the t1-library.
7
----- Copyright: t1lib is copyrighted (c) Rainer Menzner, 1996-2001.
8
As of version 0.5, t1lib is distributed under the
9
GNU General Public Library Lincense. The
10
conditions can be found in the files LICENSE and
11
LGPL, which should reside in the toplevel
12
directory of the distribution. Please note that
13
there are parts of t1lib that are subject to
15
The parseAFM-package is copyrighted by Adobe Systems
17
The type1 rasterizer is copyrighted by IBM and the
19
----- Warranties: Of course, there's NO WARRANTY OF ANY KIND :-)
20
----- Credits: I want to thank IBM and the X11-consortium for making
21
their rasterizer freely available.
22
Also thanks to Piet Tutelaers for his ps2pk, from
23
which I took the rasterizer sources in a format
25
Thanks to all people who make free software living!
26
--------------------------------------------------------------------------*/
32
/* Following struct will allow all accesses to font data! */
35
int t1lib_flags; /* Global library flags */
36
int no_fonts_ini; /* The number of fonts initially declared in
37
Font database file. */
38
int no_fonts; /* The number of currently allocated fonts including
39
logical fonts produced by T1_CopyFont() */
40
int no_fonts_limit; /* The maximum number of font for which is memory
41
currently available. */
42
int bitmap_pad; /* The value to which bitmap-scanlines are padded */
43
int endian; /* 1 if little endian representation and 0 otherwise */
44
char **default_enc; /* The default encoding vector */
45
FONTPRIVATE *pFontArray; /* Points to first element of font pointer array */
47
struct FONTBASE *pFontBase=NULL;
51
/* Further we need a struct where to save device dependent data such as
52
resolution. The values in this struct may be altered using
53
T1_SetDeviceRes(x_res,y_res). Generally, the fontsize is to be specified
54
in BigPoints ("bp")---this is the default PostScript unit. It is
59
float x_resolution; /* Value must be specified in DPI */
60
float y_resolution; /* Value must be specified in DPI */
61
float scale_x; /* horizontal scale-value to get a
62
matrix scaled to 1b */
63
float scale_y; /* vertical scale-value to get a
64
matrix scaled to 1b */
67
DEVICESPECIFICS DeviceSpecifics = { DEFAULT_RES,
69
DEFAULT_RES/BIGPOINTSPERINCH,
70
DEFAULT_RES/BIGPOINTSPERINCH
75
struct stat filestats; /* A structure where fileinfo is stored */
76
char linebuf[BUF_SIZE]; /* A buffer for reading files line
78
int T1_Up=0; /* This one is for initialization-checking */
80
/* The width of AA-pixels */
83
/* The follwoing variable allows the primary rastering functions
84
to check for the caller */
85
int SetFuncRequestID=0;
87
/* The following variable allows to suppress rastering at 1000 bp
88
for getting a correct bounding box for slanted characters -->
89
should only internally be used */
92
extern struct XYspace *IDENTITY;
94
int errornumber; /* for debugging purposes */
96
/* The following pointers should be set to path-strings--used for locating
97
type1, afm and encoding files */
98
char** T1_PFAB_ptr=NULL;
99
char** T1_AFM_ptr=NULL;
100
char** T1_ENC_ptr=NULL;
101
char** T1_FDB_ptr=NULL;
102
char** T1_FDBXLFD_ptr=NULL;
104
/* We use a uchar buffer for error and warning messages: */
105
char err_warn_msg_buf[1024];
107
/* file pointer for log-file */
108
FILE *t1lib_log_file=NULL;
109
int t1lib_log_level=2;
111
/* The errno for t1lib */
114
/* A variable for saving stack info */