~ubuntu-branches/ubuntu/karmic/grace/karmic

« back to all changes in this revision

Viewing changes to T1lib/t1lib/t1global.h

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-19 14:19:58 UTC
  • Revision ID: james.westby@ubuntu.com-20020319141958-5gxna6vo1ek3zjml
Tags: upstream-5.1.7
ImportĀ upstreamĀ versionĀ 5.1.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*--------------------------------------------------------------------------
 
2
  ----- File:        t1global.h
 
3
  ----- Author:      Rainer Menzner (Rainer.Menzner@web.de)
 
4
  ----- Date:        2001-04-01
 
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
 
14
                     other licenses:
 
15
                     The parseAFM-package is copyrighted by Adobe Systems
 
16
                     Inc.
 
17
                     The type1 rasterizer is copyrighted by IBM and the
 
18
                     X11-consortium.
 
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
 
24
                     independent from X11.
 
25
                     Thanks to all people who make free software living!
 
26
--------------------------------------------------------------------------*/
 
27
  
 
28
 
 
29
#include "t1misc.h"
 
30
 
 
31
 
 
32
/* Following struct will allow all accesses to font data! */
 
33
struct FONTBASE
 
34
{
 
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 */
 
46
} FontBase;
 
47
struct FONTBASE *pFontBase=NULL;
 
48
 
 
49
 
 
50
 
 
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
 
55
   1in=72bp.
 
56
   */
 
57
typedef struct 
 
58
{
 
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 */
 
65
} DEVICESPECIFICS;
 
66
 
 
67
DEVICESPECIFICS DeviceSpecifics = { DEFAULT_RES,
 
68
                                    DEFAULT_RES,
 
69
                                    DEFAULT_RES/BIGPOINTSPERINCH,
 
70
                                    DEFAULT_RES/BIGPOINTSPERINCH
 
71
};
 
72
 
 
73
 
 
74
 
 
75
struct stat filestats; /* A structure where fileinfo is stored */
 
76
char linebuf[BUF_SIZE];   /* A buffer for reading files line
 
77
                                             by line */
 
78
int T1_Up=0;     /* This one is for initialization-checking */
 
79
 
 
80
/* The width of AA-pixels */
 
81
int T1aa_bpp;
 
82
 
 
83
/* The follwoing variable allows the primary rastering functions
 
84
   to check for the caller */
 
85
int SetFuncRequestID=0;
 
86
 
 
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 */
 
90
int ForceAFMBBox=0;
 
91
 
 
92
extern struct XYspace *IDENTITY; 
 
93
 
 
94
int errornumber;  /* for debugging purposes */
 
95
 
 
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
 
 
103
/* We use a uchar buffer for error and warning messages: */
 
104
char err_warn_msg_buf[1024];
 
105
 
 
106
/* file pointer for log-file */
 
107
FILE *t1lib_log_file=NULL;
 
108
int  t1lib_log_level=2;
 
109
 
 
110
/* The errno for t1lib */
 
111
int T1_errno=0;
 
112
 
 
113
/* A variable for saving stack info */
 
114
jmp_buf stck_state;
 
115