1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<html> 3<head> 4<title>Hershey fonts for Ghostscript</title> 5<!-- $Id: Hershey.htm,v 1.5 2002/02/21 21:36:33 giles Exp $ --> 6<!-- Originally: hershey.txt --> 7<link rel="stylesheet" type="text/css" href="gs.css" title="Ghostscript Style"> 8</head> 9 10<body> 11<!-- [1.0 begin visible header] ============================================ --> 12 13<!-- [1.1 begin headline] ================================================== --> 14 15<h1>Hershey fonts for Ghostscript</h1> 16 17<!-- [1.1 end headline] ==================================================== --> 18 19<!-- [1.2 begin table of contents] ========================================= --> 20 21<!-- [1.2 end table of contents] =========================================== --> 22 23<!-- [1.3 begin hint] ====================================================== --> 24 25<p> 26This file, unlike the rest of Ghostscript, consists entirely of information 27copied from public sources. It therefore is not covered by the 28Ghostscript copyright or license: it is in the public domain. 29 30<p>For other information, see the <a href="Readme.htm">Ghostscript 31overview</a>. You can also read about <a href="Fonts.htm">Ghostscript 32fonts</a> in general. 33 34<!-- [1.3 end hint] ======================================================== --> 35 36<hr> 37 38<!-- [1.0 end visible header] ============================================== --> 39 40<!-- [2.0 begin contents] ================================================== --> 41 42<pre> 43Mod.sources: Volume 4, Issue 42 44Submitted by: pyramid!octopus!pete (Pete Holzmann) 45 46This is part 1 of five parts of the first Usenet distribution of 47the Hershey Fonts. See the README file for more details. 48 49Peter Holzmann, Octopus Enterprises 50USPS: 19611 La Mar Court, Cupertino, CA 95014 51UUCP: {hplabs!hpdsd,pyramid}!octopus!pete 52Phone: 408/996-7746 53 54This distribution is made possible through the collective encouragement 55of the Usenet Font Consortium, a mailing list that sprang to life to get 56this accomplished and that will now most likely disappear into the mists 57of time... Thanks are especially due to Jim Hurt, who provided the packed 58font data for the distribution, along with a lot of other help. 59 60This file describes the Hershey Fonts in general, along with a description of 61the other files in this distribution and a simple re-distribution restriction. 62 63USE RESTRICTION: 64 This distribution of the Hershey Fonts may be used by anyone for 65 any purpose, commercial or otherwise, providing that: 66 1. The following acknowledgements must be distributed with 67 the font data: 68 - The Hershey Fonts were originally created by Dr. 69 A. V. Hershey while working at the U. S. 70 National Bureau of Standards. 71 - The format of the Font data in this distribution 72 was originally created by 73 James Hurt 74 Cognition, Inc. 75 900 Technology Park Drive 76 Billerica, MA 01821 77 (mit-eddie!ci-dandelion!hurt) 78 2. The font data in this distribution may be converted into 79 any other format *EXCEPT* the format distributed by 80 the U.S. NTIS (which organization holds the rights 81 to the distribution and use of the font data in that 82 particular format). Not that anybody would really 83 *want* to use their format... each point is described 84 in eight bytes as "xxx yyy:", where xxx and yyy are 85 the coordinate values as ASCII numbers. 86 87*PLEASE* be reassured: The legal implications of NTIS' attempt to control 88a particular form of the Hershey Fonts *are* troubling. HOWEVER: We have 89been endlessly and repeatedly assured by NTIS that they do not care what 90we do with our version of the font data, they do not want to know about it, 91they understand that we are distributing this information all over the world, 92etc etc etc... but because it isn't in their *exact* distribution format, they 93just don't care!!! So go ahead and use the data with a clear conscience! (If 94you feel bad about it, take a smaller deduction for something on your taxes 95next week...) 96 97The Hershey Fonts: 98 - are a set of more than 2000 glyph (symbol) descriptions in vector 99 ( <x,y> point-to-point ) format 100 - can be grouped as almost 20 'occidental' (english, greek, 101 cyrillic) fonts, 3 or more 'oriental' (Kanji, Hiragana, 102 and Katakana) fonts, and a few hundred miscellaneous 103 symbols (mathematical, musical, cartographic, etc etc) 104 - are suitable for typographic quality output on a vector device 105 (such as a plotter) when used at an appropriate scale. 106 - were digitized by Dr. A. V. Hershey while working for the U.S. 107 Government National Bureau of Standards (NBS). 108 - are in the public domain, with a few caveats: 109 - They are available from NTIS (National Technical Info. 110 Service) in a computer-readable from which is *not* 111 in the public domain. This format is described in 112 a hardcopy publication "Tables of Coordinates for 113 Hershey's Repertory of Occidental Type Fonts and 114 Graphic Symbols" available from NTIS for less than 115 $20 US (phone number +1 703 487 4763). 116 - NTIS does not care about and doesn't want to know about 117 what happens to Hershey Font data that is not 118 distributed in their exact format. 119 - This distribution is not in the NTIS format, and thus is 120 only subject to the simple restriction described 121 at the top of this file. 122 123Hard Copy samples of the Hershey Fonts are best obtained by purchasing the 124book described above from NTIS. It contains a sample of all of the Occidental 125symbols (but none of the Oriental symbols). 126 127This distribution: 128 - contains 129 * a complete copy of the Font data using the original 130 glyph-numbering sequence 131 * a set of translation tables that could be used to generate 132 ASCII-sequence fonts in various typestyles 133 * a couple of sample programs in C and Fortran that are 134 capable of parsing the font data and displaying it 135 on a graphic device (we recommend that if you 136 wish to write programs using the fonts, you should 137 hack up one of these until it works on your system) 138 139 - consists of the following files... 140 hershey.doc - details of the font data format, typestyles and 141 symbols included, etc. 142 hersh.oc[1-4] - The Occidental font data (these files can 143 be catenated into one large database) 144 hersh.or[1-4] - The Oriental font data (likewise here) 145 *.hmp - Occidental font map files. Each file is a translation 146 table from Hershey glyph numbers to ASCII 147 sequence for a particular typestyle. 148 hershey.f77 - A fortran program that reads and displays all 149 of the glyphs in a Hershey font file. 150 hershey.c - The same, in C, using GKS, for MS-DOS and the 151 PC-Color Graphics Adaptor. 152 153Additional Work To Be Done (volunteers welcome!): 154 155 - Integrate this complete set of data with the hershey font typesetting 156 program recently distributed to mod.sources 157 - Come up with an integrated data structure and supporting routines 158 that make use of the ASCII translation tables 159 - Digitize additional characters for the few places where non-ideal 160 symbol substitutions were made in the ASCII translation tables. 161 - Make a version of the demo program (hershey.c or hershey.f77) that 162 uses the standard Un*x plot routines. 163 - Write a banner-style program using Hershey Fonts for input and 164 non-graphic terminals or printers for output. 165 - Anything else you'd like! 166 167This file provides a brief description of the contents of the Occidental 168Hershey Font Files. For a complete listing of the fonts in hard copy, order 169NBS Special Publication 424, "A contribution to computer typesetting 170techniques: Tables of Coordinates for Hershey's Repertory of Occidental 171Type Fonts and Graphic Symbols". You can get it from NTIS (phone number is 172+1 703 487 4763) for less than twenty dollars US. 173 174Basic Glyph (symbol) data: 175 176 hersh.oc1 - numbers 1 to 1199 177 hersh.oc2 - numbers 1200 to 2499 178 hersh.oc3 - numbers 2500 to 3199 179 hersh.oc4 - numbers 3200 to 3999 180 181 These four files contain approximately 19 different fonts in 182the A-Z alphabet plus greek and cyrillic, along with hundreds of special 183symbols, described generically below. 184 185 There are also four files of Oriental fonts (hersh.or[1-4]). These 186files contain symbols from three Japanese alphabets (Kanji, Hiragana, and 187Katakana). It is unknown what other symbols may be contained therein, nor 188is it known what order the symbols are in (I don't know Japanese!). 189 190 Back to the Occidental files: 191 192Fonts: 193 Roman: Plain, Simplex, Duplex, Complex Small, Complex, Triplex 194 Italic: Complex Small, Complex, Triplex 195 Script: Simplex, Complex 196 Gothic: German, English, Italian 197 Greek: Plain, Simplex, Complex Small, Complex 198 Cyrillic: Complex 199 200Symbols: 201 Mathematical (227-229,232,727-779,732,737-740,1227-1270,2227-2270, 202 1294-1412,2294-2295,2401-2412) 203 Daggers (for footnotes, etc) (1276-1279, 2276-2279) 204 Astronomical (1281-1293,2281-2293) 205 Astrological (2301-2312) 206 Musical (2317-2382) 207 Typesetting (ffl,fl,fi sorts of things) (miscellaneous places) 208 Miscellaneous (mostly in 741-909, but also elsewhere): 209 - Playing card suits 210 - Meteorology 211 - Graphics (lines, curves) 212 - Electrical 213 - Geometric (shapes) 214 - Cartographic 215 - Naval 216 - Agricultural 217 - Highways 218 - Etc... 219 220ASCII sequence translation files: 221 222 The Hershey glyphs, while in a particular order, are not in an 223 ASCII sequence. I have provided translation files that give the 224 sequence of glyph numbers that will most closely approximate the 225 ASCII printing sequence (from space through ~, with the degree 226 circle tacked on at the end) for each of the above fonts: 227 228 File names are made up of fffffftt.hmp, 229 230 where ffffff is the font style, one of: 231 roman Roman 232 greek Greek 233 italic Italic 234 script Script 235 cyril Cyrillic (some characters not placed in 236 the ASCII sequence) 237 gothgr Gothic German 238 gothgb Gothic English 239 gothit Gothic Italian 240 241 and tt is the font type, one of: 242 p Plain (very small, no lower case) 243 s Simplex (plain, normal size, no serifs) 244 d Duplex (normal size, no serifs, doubled lines) 245 c Complex (normal size, serifs, doubled lines) 246 t Triplex (normal size, serifs, tripled lines) 247 cs Complex Small (Complex, smaller than normal size) 248 249The three sizes are coded with particular base line (bottom of a capital 250 letter) and cap line (top of a capital letter) values for 'y': 251 252 Size Base Line Cap Line 253 254 Very Small -5 +4 255 Small -6 +7 256 Normal -9 +12 257 258 (Note: some glyphs in the 'Very Small' fonts are actually 'Small') 259 260The top line and bottom line, which are normally used to define vertical 261 spacing, are not given. Maybe somebody can determine appropriate 262 values for these! 263 264The left line and right line, which are used to define horizontal spacing, 265 are provided with each character in the database. 266 267Format of Hershey glyphs: 268 2695 bytes - glyphnumber 2703 bytes - length of data length in 16-bit words including left&right numbers 2711 byte - x value of left margin 2721 byte - x value of right margin 273(length*2)-2 bytes - stroke data 274 275left&right margins and stroke data are biased by the value of the letter 'R' 276Subtract the letter 'R' to get the data. 277 278e.g. if the data byte is 'R', the data is 0 279 if the data byte is 'T', the data is +2 280 if the data byte is 'J', the data is -8 281 282and so on... 283 284The coordinate system is x-y, with the origin (0,0) in the center of the 285glyph. X increases to the right and y increases *down*. 286 287The stroke data is pairs of bytes, one byte for x followed by one byte for y. 288 289An 'R' in the stroke data indicates a 'lift pen and move' instruction. 290</pre> 291 292<!-- [2.0 end contents] ==================================================== --> 293 294<!-- [3.0 begin visible trailer] =========================================== --> 295 296<hr> 297 298<p> 299<small>Public Domain.</small> 300<small>Distributed with Ghostscript 6.50, November 2000</small> 301 302<!-- [3.0 end visible trailer] ============================================= --> 303 304</body> 305</html> 306