Page:NBS Technical Note 11176 (1983) (IAutilityprogramsf1176dick).djvu/13

This page has been proofread, but needs to be validated.

we have made some reasonably liberal changes in these fonts to provide for our particular application.

THE HERSHEY CHARACTERS

As tabulated by Wolcott and Hilsenrath (12-13), the Hershey characters consist of a series of numbers which indicate the end points of straight line segments which are used to define alphanumeric and special symbols. Each succeeding number pair indicates the coordinates of the next dot to be connected in a connect the dots scheme. For example, the vectors that correspond to the capital A illustrated in Figure 1, are given in the following format:

 1: -5  5: 0  -5: -4   4:-64   0:  0   -5:  4   4:-64    0: 
    -2  1: 2   1:-64 -64: 

In this representation, the first number is the character number in the Hershey set, the first pair of numbers indicates the X coordinates of the limits of the character (-5,5), and the actual character begins at the next coordinate location (x=0,y=-5). It should be noted, in this context, that the coordinates are determined in a system where the x-axis is increasing from left to right, arid the y-axis increases from top to bottom in accordance with standard printing notation where vertical deflections increase down the page. This is also the convention utilized by the Apple II for its graphics displays. The origin of the coordinate system is located approximately at the center of the character. Succeeding pairs of coordinates indicate the next point to be connected to draw the figure. A coordinate pair of -64 0 indicates that the next line is not to be drawn, but the stylus is to be moved to the next location. Finally, a coordinate pair of -64 -64 completes the figure.

For use on the Apple II computer system, we have chosen to store the characters as strings in a dimensioned array named X$. In order that the length of any particular string not exceed the maximum limit of 255 characters allowed, we have chosen to store

Utility Programs...
- 4 -