This file is indexed.

/usr/share/doc/grads/html/font.html is in grads 2:2.0.1-1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!--Copyright (C) 1988-2005 by the Institute of Global Environment and Society (IGES). See file COPYRIGHT for more information.--><style type="text/css">
<!--
body {
	background-color: #e0f0ff;
}
-->
</style>

<h1>Font File </h1>

GrADS currently supports fonts numbered 0 to 9.  Fonts 0 to 5 are
provided with the GrADS distribution.  The files are named
<code>font0.dat</code>, <code>font1.dat</code>, etc.  If you create
a <code>font6.dat</code> file (or 7 through
9) and put it in the same place as the other font
files, you can use that font immediately, by using the <code><a
href="gradcomdsetfont.html">set font</a></code> command,  or via <a href="fontcontrol.html">font escape sequences</a>.
<p>

The font files are in an ASCII format.  Each file is 95
records in length.  Each record represents a character in the font,
and the records are ordered in the order of ASCII code values,
starting with the blank (code value 32 decimal).  So the last
record represents the tilde, the 17th record the zero, etc.  So when
you are using the font the file represents, and enter a zero
character, the character  in the 17th record is plotted, whatever it
may be.<p>

Each record starts with a 3 character number.  This is
the number of code pairs in the record.  This number is followed by
the indicated number of code pairs.  Each code pair is two
characters. Each character represents a value, which is determined
as an offset from the Capital R (decimal 82).  So, if the character
is Capital L, it represents a value of -6.  If the character is a
lower case k, it represents a value of +25.  <p>

The first code pair represents the horizontal extent of
the character. So the first character of the code pair would be the
minimum X, and the 2nd character the maximum X.  If I remember correctly,
this extent should include white space.  This is followed by code
pairs that represent drawing positions in X and Y, where the first
character is X, and the 2nd Y.  A "pen up" is indicated by the code pair " R" (blank,
followed by capital R).  <p>

You can look at the existing font files for examples.
If you look at 
<code>font0.dat</code>, the first record represents the blank.  It
thus has one code
pair, which just represents the width of the blank in
the font, thus
allocating white space when a blank is encountered.  If
you look at 
record <code>57</code> (which represents Cap X), you see:
<code>6H\KFY[ RYFK[</code>
Decoding this, you see there are 6 code pairs.  The
first is the 
width extent, <code>H\</code>, which is -10 to 10.  The next two
pairs, <code>KFY[</code>, 
are points -7,-12 and 7,9.  So a line would be drawn
between those
two points (appropriate scaled).  The next code pair
indicates pen up, 
followed by <code>YFK[</code>, which are 7,-12 and -7,9.  <p>

You can see the horizontal extent does not match too
well with the 
actual character.  I am not quite sure why this is, nor
why the 
character is not centered.  This is the way the fonts
came, so I assume
there are some font design issues involved.  <p>

If you want to design your own font, you will need to
review the 
code GraDS uses to actually plot these fonts, which is
<code>gxchpl.c</code>.
I determined scale factors and centering issues by trial
and error, and
these values are contained in the code.<p>