~ubuntu-branches/ubuntu/utopic/texlive-bin/utopic

« back to all changes in this revision

Viewing changes to libs/t1lib/t1lib-5.1.2/lib/t1lib/t1global.h

  • Committer: Package Import Robot
  • Author(s): Norbert Preining
  • Date: 2012-04-10 10:16:01 UTC
  • mfrom: (1.2.3)
  • Revision ID: package-import@ubuntu.com-20120410101601-7mt8nyn280xrgza6
Tags: 2011.20120410-1
* new upstream checkout:
  - remove decls of popen and pclose (Closes: #64524) (!yow, 5 digit bug!)
  - do not declare getopt in C++, fixes FTBFS with g++ >= 4.7 
    (Closes: #667392)
* add patches (maybe to be included upstream) that allows inclusion of
  one config file in another for (x)dvipdfmx. This will be
  used by the paper code.
* fix description of libptexenc-dev package (Closes: #667694)
* remove xdvik patch, included upstream
* remove conflict with ptex-bin, we are building a transitional package now
* build with internal t1lib, as t1lib is going to disappear in
  wheezy (Closes: #667912) (no, dropping xdvi is not an option!)
  (add a lintian override otherwise this gives a lintian error)

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:        2005-05-16
 
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
char** T1_FDBXLFD_ptr=NULL;
 
103
 
 
104
/* We use a uchar buffer for error and warning messages: */
 
105
char err_warn_msg_buf[1024];
 
106
 
 
107
/* file pointer for log-file */
 
108
FILE *t1lib_log_file=NULL;
 
109
int  t1lib_log_level=2;
 
110
 
 
111
/* The errno for t1lib */
 
112
int T1_errno=0;
 
113
 
 
114
/* A variable for saving stack info */
 
115
jmp_buf stck_state;
 
116