Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbatt!cbosgd!ihnp4!inuxc!pur-ee!uiucdcs!uiucdcsp!aslam From: aslam@uiucdcsp.CS.UIUC.EDU Newsgroups: net.graphics Subject: How are hershey fonts coded? Message-ID: <7400003@uiucdcsp> Date: Mon, 18-Aug-86 16:28:00 EDT Article-I.D.: uiucdcsp.7400003 Posted: Mon Aug 18 16:28:00 1986 Date-Received: Wed, 20-Aug-86 01:48:43 EDT Lines: 51 Nf-ID: #N:uiucdcsp:7400003:000:1978 Nf-From: uiucdcsp.CS.UIUC.EDU!aslam Aug 18 15:28:00 1986 For some odd reason my note got chopped. Hopefully this time it makes it through intact. Couple of months ago, hershey fonts were posted to the net. The accompanying documentation in hershey.doc and README outlined what all the files were and two example programs, hershey.f77 and hershey.c, could be usedto display the characters in hersh.oc1, hersh.oc2 etc. What I could not find was an explanation of the actual vector data. For example, character 214 is coded as: 214 12PURMRR RSMSR RRURVSVSURU The 12 indicates the number of strokes. Each of the letter pair that follows 12 forms an x,y coordinate. The first character pair however specifies the width of the character. If the first character of a pair is a blank then the next pair specifies a move instead of a draw. And now the unresolved questions. 1. What is the reference point for the coordinates that have been coded using ascii characters? For example, the second pair "RM" yields ascii integers 82 and 77. Where is the origin for this move? 2. Why is the width of the character coded using two characters? In the example above the characters are "PU" which gives ascii decimals 80 and 85. 3. If I want to draw a character left justified at a particular coordinate, say x1,y1, how do I generate vectors using the width and the strokes data. 4. If I want the characters to be of a specific height and width in inches, how do I map the hershey font data into inches? 5. Has someone developed a symbol routine based on the hershey fonts that can draw a text string? I.e., subroutine symbol( x, y, font, height, text ) real x,y, height integer font character *(*) text I will welcome responses that shed more light on how the hershey font data is coded and arranged and how to use it in the setting of a routine like symbol. Sohail Aslam Dept. of Computer Science. University of Illinois at Urbana-Champaign arpa aslam@uiuc csnet aslam@uiuc.csnet usenet {ihnp4,seismo}!uiucdcs!aslam