summaryrefslogtreecommitdiff
path: root/fonts/hershey/xhershey.1
blob: 66e4f7d2f2c62d41eedc1631a7c90c42865e41e2 (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
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
.TH XHERHSEY 1 "22 November 1988"
.SH NAME
xhershey \- view Hershey characters and generate METAFONT
.SH SYNOPSIS
.B xhershey
[
.B \-f
.I database
] [
.B \-m
.I magnification
] [
.B \-n
.I annotelevel
] [
.B \-M
] [
.B \-X
] [
.I specfile
]
.SH DESCRIPTION
.I Xhershey
reads a specification input file, or standard input if
a file name is not specified,
displays the Hershey characters requested and
generates METAFONT code from the character description.
Both viewing and METAFONT generation are optional.
.SH OPTIONS
.IP "\fB\-f\fP \fIdatabase\fP"
Selects an alternate Hershey database. The
default filename is ``occidental''.
The database should be in Usenet format, with
.B one
character description to each line.
The distributed databases will have to have many of its
lines joined first.
.IP "\fB\-m\fP \fImagnification\fP"
Select a different magnification from the default 2.
This controls the ratio of the displayed pixel dimensions
to the Hershey stroke dimensions.
.IP "\fB\-n\fP \fIannotelevel\fP"
Annotelevel is a number between 0 and 2.
If 0 then no number labels are attached to the screen display.
If 1 then only end points are labelled.
If 2 then all points are labelled.
This option is not as useful as the METAFONT feature
that inspired it because the display is not large
enough to prevent labels from crowding.
.IP "\fB\-M\fP
Supress METAFONT code generation.
.IP "\fB\-X\fP
Supress X window display.
.SH OPERATION
Three lines are drawn in the X display window:
the baseline and the left and right extents.
Any button click in the window will command
.I xhershey
to go on to the next character.
The METAFONT code is generated before the character
is displayed, allowing one to see the correspondence
between the code and the picture.
.SH EXAMPLE
To generate METAFONT for a Script style font:
.sp 1
.br
xhershey -X hscs.spec > hscs.mf
.SH "FORMAT OF SPECIFICATION FILE"
The specification file contains a line for every
character that is to be generated.
Each line specifies the glyph position in the
font and the Hershey index for the character description.
In addition, some attributes can be set on a per character basis.
Currently these are: hoff (horizontal offset), voff (vertical offset),
hratio (Hershey to MF horizontal scale) and vratio (Hershey to
MF vertical scale).
These are used to tune the size and offsets of
the generated characters.
For example, most of the Hershey characters have
a baseline offset of 9 (NORMALVOFF) but some characters
in the database have a smaller baseline offset.
Lines that do not begin with a single quote or a digit
are taken to be global attributes and the same four
attributes can be specified.
In the absence of per character attributes,
global attributes are the default.
Here are the first few lines from hscs.spec:
.sp
.nf
hratio=10/14,vratio=10/14
\&'!',714
\&'"',717
\&'#',733
\&'$',719
.fi
.sp
As can be seen, attributes are treated as strings.
Hoff and voff should be integer strings because they
are added to the origin during code generation.
.PP
An examination of the output code shows clearly their
purpose:
.sp
.nf
x#:=10/14u#; y#:=10/14u#;
beginchar("!",10x#,22y#,0y#); "The letter !";
adjust_fit(0,0); pickup plotter_pen;
x:=10/14u; y:=10/14u;
z0=(4x,22y);
\&...
.fi
.sp
.SH "SEE ALSO"
cmmf(1)
.SH BUGS
Hershey characters look a little rough and the METAFONT
output may need hand-tuning.
It is not clear if enough quality can be obtained from
the results to justify the work.
After all, the Hershey fonts are only pen plotter fonts.
.SH COPYRIGHT
Copyright (C) Ken Yap 1988.
I don't mind you giving this program away to anybody, but
please don't charge money for it, it isn't worth that much.
Please do retain my name in the code and docs.
.SH AUTHOR
Ken Yap (U. of Rochester)
.br
ken@cs.rochester.edu