summaryrefslogtreecommitdiff
path: root/Build/source/texk/dviljk/tfm.h
blob: 25884040e93e88cc6f7261b0021570cd8f4cd70c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef _TFM_H
#define _TFM_H

/* ******** Declarations used in dvi2xx.[ch] and tfm.c ******** */

/* ******** Types ******** */

/* ******** Information returned by tfm_read_info ******** */
typedef struct {
  /* These string lengths are imposed by the TFM format. Either of these
     values may be the empty string.  */
  unsigned char coding_scheme[40];
  unsigned char family[20];

  /* The second fontdimen. */
  unsigned interword;

  /* These values are what will work to select the font in PCL. If this
     TFM file doesn't have the `KN' extensions (distinguishable by the
     family == "HPAUTOTFM"). */
#define SPACING_FIXED 0
#define SPACING_PROPORTIONAL 1
  unsigned spacing;
  int weight;
  unsigned style;
  unsigned typeface_id;

  /* TFM files can always have 256 characters, even if we're using the
     old pixel format that only supports 128. The values are fix-words
     scaled by the design size; i.e., straight from the TFM file. */
  long4 widths[256];
} tfm_info_type;

/* ******** Defined in dvi2xx.h ******** */

#ifndef KPATHSEA
extern char* TFMpath;
#endif
extern bool G_quiet;

/* ******** Defined in dvi2xx.c ******** */

extern void Fatal(const char *, ...);
extern long4 NoSignExtend(FILEPTR, int);
extern void Warning(const char *, ...);

/* ******** Defined in tfm.c ******** */

extern bool tfm_read_info(char *, tfm_info_type *);

#endif /* _TFM_H */