# Fonts, Strings, and Symbols

The libplot vector graphics library and applications built on it, such as graph and plot, can draw text strings in a wide variety of fonts. Text strings may include characters from more than one font in a typeface, and may include superscripts, subscripts, and square roots. A wide variety of plotting symbols can also be drawn. The following sections explain how to use these features.

## Available text fonts

The libplot library and applications built on it, such as graph, plot, tek2plot, and pic2plot, can use many fonts. These include 22 Hershey vector fonts, 35 Postscript fonts, 45 PCL 5 fonts, and 18 Hewlett--Packard vector fonts. We call these 120 supported fonts the built-in' fonts. The Hershey fonts are constructed from stroked characters digitized c. 1967 by Dr. Allen V. Hershey at the U.S. Naval Surface Weapons Center in Dahlgren, VA. The 35 Postscript fonts are the outline fonts resident in all modern Postscript printers, and the 45 PCL 5 fonts are the outline fonts resident in modern Hewlett--Packard LaserJet printers and plotters. (The old LaserJet III, which was Hewlett--Packard's first PCL 5 printer, supported only 8 of the 45.) The 18 Hewlett--Packard vector fonts are fonts that are resident in Hewlett--Packard printers and plotters (mostly the latter).

The Hershey fonts can be used by all types of Plotter supported by libplot, and the Postscript fonts can be used by X, Illustrator, Postscript, and Fig Plotters. So, for example, all variants of graph can use the Hershey fonts, and graph -T X, graph -T ai, graph -T ps and graph -T fig can use the Postscript fonts. The PCL 5 fonts can be used by by Illustrator, PCL, and HP-GL Plotters, and by graph -T ai, graph -T pcl, and graph -T hpgl. The Hewlett--Packard vector fonts can be used by by PCL and HP-GL Plotters, and by graph -T pcl and graph -T hpgl. X Plotters and graph -T X are not restricted to the built-in Hershey and Postscript fonts. They can use any X Window System font.

The plotfont utility, which accepts the -T' option, will print a character map of any font that is available in the specified output format. See section The plotfont Utility.

For the purpose of plotting text strings (see section Text string format and escape sequences), the 120 built-in fonts are divided into typefaces. As you can see from the following tables, our convention is that in any typeface with more than a single font, font #1 is the normal font, font #2 is italic or oblique, font #3 is bold, and font #4 is bold italic or bold oblique. Additional variants (if any) are numbered #5 and higher.

The 22 Hershey fonts are divided into typefaces as follows.

• HersheySerif
1. HersheySerif
2. HersheySerif-Italic
3. HersheySerif-Bold
4. HersheySerif-BoldItalic
5. HersheyCyrillic
6. HersheyCyrillic-Oblique
7. HersheyEUC
• HersheySans
1. HersheySans
2. HersheySans-Oblique
3. HersheySans-Bold
4. HersheySans-BoldOblique
• HersheyScript
1. HersheyScript
2. HersheyScript
3. HersheyScript-Bold
4. HersheyScript-Bold
• HersheyGothicEnglish
• HersheyGothicGerman
• HersheyGothicItalian
• HersheySerifSymbol
1. HersheySerifSymbol
2. HersheySerifSymbol-Oblique
3. HersheySerifSymbol-Bold
4. HersheySerifSymbol-BoldOblique
• HersheySansSymbol
1. HersheySansSymbol
2. HersheySansSymbol-Oblique

Nearly all Hershey fonts except the Symbol fonts use the ISO-Latin-1 encoding, which is a superset of ASCII. The Symbol fonts consist of Greek characters and mathematical symbols, and use the symbol font encoding documented in the Postscript Language Reference Manual. By convention, each Hershey typeface contains a symbol font (HersheySerifSymbol or HersheySansSymbol, as appropriate) as font #0.

HersheyCyrillic, HersheyCyrillic-Oblique, and HersheyEUC (which is a Japanese font) are the only non-Symbol Hershey fonts that do not use the ISO-Latin-1 encoding. For their encodings, see section Cyrillic and Japanese fonts.

The 35 Postscript fonts are divided into typefaces as follows.

• Helvetica
1. Helvetica
2. Helvetica-Oblique
3. Helvetica-Bold
4. Helvetica-BoldOblique
• Helvetica-Narrow
1. Helvetica-Narrow
2. Helvetica-Narrow-Oblique
3. Helvetica-Narrow-Bold
4. Helvetica-Narrow-BoldOblique
• Times
1. Times-Roman
2. Times-Italic
3. Times-Bold
4. Times-BoldItalic
• AvantGarde
1. AvantGarde-Book
2. AvantGarde-BookOblique
3. AvantGarde-Demi
4. AvantGarde-DemiOblique
• Bookman
1. Bookman-Light
2. Bookman-LightItalic
3. Bookman-Demi
4. Bookman-DemiItalic
• Courier
1. Courier
2. Courier-Oblique
3. Courier-Bold
4. Courier-BoldOblique
• NewCenturySchlbk
1. NewCenturySchlbk-Roman
2. NewCenturySchlbk-Italic
3. NewCenturySchlbk-Bold
4. NewCenturySchlbk-BoldItalic
• Palatino
1. Palatino-Roman
2. Palatino-Italic
3. Palatino-Bold
4. Palatino-BoldItalic
• ZapfChancery-MediumItalic
• ZapfDingbats
• Symbol

All Postscript fonts except the ZapfDingbats and Symbol fonts use the ISO-Latin-1 encoding. The encodings used by the ZapfDingbats and Symbol fonts are documented in the Postscript Language Reference Manual. By convention, each Postscript typeface contains the Symbol font as font #0.

The 45 PCL 5 fonts are divided into typefaces as follows.

• Univers
1. Univers
2. Univers-Oblique
3. Univers-Bold
4. Univers-BoldOblique
• UniversCondensed
1. UniversCondensed
2. UniversCondensed-Oblique
3. UniversCondensed-Bold
4. UniversCondensed-BoldOblique
• CGTimes
1. CGTimes-Roman
2. CGTimes-Italic
3. CGTimes-Bold
4. CGTimes-BoldItalic
• Albertus
1. AlbertusMedium
2. AlbertusMedium
3. AlbertusExtraBold
4. AlbertusExtraBold
• AntiqueOlive
1. AntiqueOlive
2. AntiqueOlive-Italic
3. AntiqueOlive-Bold
• Arial
1. Arial-Roman
2. Arial-Italic
3. Arial-Bold
4. Arial-BoldItalic
• ClarendonCondensed
• Coronet
• Courier
1. Courier
2. Courier-Italic
3. Courier-Bold
4. Courier-BoldItalic
• Garamond
1. Garamond
2. Garamond-Italic
3. Garamond-Bold
4. Garamond-BoldItalic
• LetterGothic
1. LetterGothic-Roman
2. LetterGothic-Italic
3. LetterGothic-Bold
4. LetterGothic-BoldItalic
• Marigold
• CGOmega
1. CGOmega-Roman
2. CGOmega-Italic
3. CGOmega-Bold
4. CGOmega-BoldItalic
• TimesNewRoman
1. TimesNewRoman
2. TimesNewRoman-Italic
3. TimesNewRoman-Bold
4. TimesNewRoman-BoldItalic
• Wingdings
• Symbol

All PCL 5 fonts except the Wingdings and Symbol fonts use the ISO-Latin-1 encoding. The encoding used by the Symbol font is the symbol font encoding documented in the Postscript Language Reference Manual. By convention, each PCL typeface contains the Symbol font as font #0.

The 18 Hewlett--Packard vector fonts are divided into typefaces as follows.

• Arc
1. Arc
2. Arc-Oblique
3. Arc-Bold
4. Arc-BoldOblique
• Stick
1. Stick
2. Stick-Oblique
3. Stick-Bold
4. Stick-BoldOblique
• ArcANK
1. ArcANK*
2. ArcANK-Oblique*
3. ArcANK-Bold*
4. ArcANK-BoldOblique*
• StickANK
1. StickANK*
2. StickANK-Oblique*
3. StickANK-Bold*
4. StickANK-BoldOblique*
• ArcSymbol*
• StickSymbol*

The Hewlett--Packard vector fonts with an asterisk (the ANK and Symbol fonts) are only available when producing HP-GL output for the HP7550A graphics plotter and the HP758x, HP7595A and HP7596A drafting plotters. The ANK fonts are Japanese fonts (see section Cyrillic and Japanese fonts), and the Symbol fonts contain a few miscellaneous mathematical symbols. To ensure that these fonts are available, you must set the environment variable or driver parameter HPGL_VERSION to "1.5".

All Hewlett--Packard vector fonts except the ANK and Symbol fonts use the ISO-Latin-1 encoding. The Arc fonts are proportional (variable-width) fonts, and the Stick fonts are fixed-width fonts. If HPGL_VERSION is "1.5" then the Arc fonts will be kerned. But if HPGL_VERSION is "2" (the default), there will be no kerning. Apparently Hewlett--Packard dropped support for device-resident kerning tables when moving from HP-GL to modern HP-GL/2 and PCL 5. For information about Hewlett--Packard vector fonts and the way in which they are kerned (in pen plotters, at least), see the article by L. W. Hennessee et al. in the Nov. 1981 issue of the Hewlett--Packard Journal.

To what extent do the fonts supported by libplot contain ligatures? The Postscript fonts, the PCL 5 fonts, and the Hewlett--Packard vector fonts, at least as implemented in libplot, do not contain ligatures. However, six of the 22 Hershey fonts contain ligatures. The character combinations "fi", "ff", "fl", "ffi", and "ffl" are automatically drawn as ligatures in HersheySerif and HersheySerif-Italic. (Also in the two HersheyCyrillic fonts and HersheyEUC, since insofar as printable ASCII characters are concerned, they are identical [or almost identical] to HersheySerif.) In addition, "tz" and "ch" are ligatures in HersheyGothicGerman. The German double-s character @ss{'}, which is called an eszet', is not treated as a ligature in any font. To obtain an eszet, you must either request one with the escape sequence "\ss" (see section Text string format and escape sequences), or, if you have an 8-bit keyboard, type an eszet explicitly.

## Cyrillic and Japanese fonts

The built-in fonts discussed in the previous section include Cyrillic and Japanese vector fonts. This section explains how these fonts are encoded, i.e., how their character maps are laid out. You may use the plotfont utility to display the character map for any font, including the Cyrillic and Japanese vector fonts. See section The plotfont Utility.

The HersheyCyrillic and HersheyCyrillic-Oblique fonts use an encoding called KOI8-R, a superset of ASCII that has become the de facto standard for Unix and networking applications in the former Soviet Union. Insofar as printable ASCII characters go, they resemble the HersheySerif vector font. But their upper halves are different. The byte range 0xc0...0xdf contains lower-case Cyrillic characters and the byte range 0xe0...0xff contains upper case Cyrillic characters. Additional Cyrillic characters are located at 0xa3 and 0xb3. For more on the encoding scheme, see the official KOI8-R Web page and Internet RFC 1489, which is available from the Information Sciences Institute.

The HersheyEUC font is a vector font that is is used for displaying Japanese text. It uses the 8-bit EUC-JP encoding. EUC stands for extended Unix code', which is a scheme for encoding Japanese, and also other character sets (e.g., Greek and Cyrillic) as multibyte character strings. The format of EUC strings is explained in Ken Lunde's Understanding Japanese Information Processing (O'Reilly, 1993), which contains much additional information on Japanese text processing. See also his on-line supplement.

In the HersheyEUC font, characters in the printable ASCII range, 0x20...0x7e, are similar to HersheySerif (their encoding is JIS Roman', an ASCII variant standardized by the Japanese Industrial Standards Committee). Also, each successive pair of bytes in the 0xa1...0xfe range defines a single character in the JIS X0208 standard. The characters in the JIS X0208 standard include Japanese syllabic characters (Hiragana and Katakana), ideographic characters (Kanji), Roman, Greek, and Cyrillic alphabets, punctuation marks, and miscellaneous symbols. For example, the JIS X0208 standard indexes the 83 Hiragana as 0x2421...0x2473. To obtain the EUC code for any JIS X0208 character, you would add 0x80 to each byte (i.e., set the high bit' on each byte). So the first of the 83 Hiragana (0x2421) would be encoded as the successive pair of bytes 0xa4 and 0xa1.

The implementation of the JIS X0208 standard in the HersheyEUC font is based on Dr. Hershey's digitizations, and is complete enough to be useful. All 83 Hiragana and 86 Katakana are available, though the little-used half-width Katakana' are not supported. Also, 603 Kanji are available, including 596 of the 2965 JIS Level 1 (i.e., frequently used) Kanji. The Hiragana, the Katakana, and the available Kanji all have the same width. The file kanji.doc', which on most systems is installed in /usr/share/libplot' or /usr/local/share/libplot', lists the 603 available Kanji. Each JIS X0208 character that is unavailable will be drawn as an undefined character' glyph (a bundle of horizontal lines).

The eight Hewlett--Packard vector fonts in the ArcANK and StickANK typefaces are also used for displaying Japanese text. They are available when producing HP-GL output for the HP7550A graphics plotter and the HP758x, HP7595A and HP7596A drafting plotters. To ensure that they are available, you must set the environment variable or driver parameter HPGL_VERSION to "1.5".

ANK stands for Alphabet, Numerals, and Katakana. The ANK fonts use the Kana-8' encoding. The lower half of each font uses the JIS Roman encoding, and the upper half contains half-width Katakana. Half-width Katakana are simplified Katakana that may need to be equipped with diacritical marks. The diacritical marks are included in the encoding, as separate characters.

## Available text fonts for the X Window System

The plotting utilities graph -T X, plot -T X, tek2plot -T X, pic2plot -T X, and plotfont -T X, and the libplot library that they are built on, can draw text on an X Window System display in a wide variety of fonts. This includes the 22 built-in Hershey vector fonts. They can use the 35 built-in Postscript fonts too, if those fonts are available on the X display. Most releases of the plotting utilities include freely distributable versions of the 35 Postscript fonts, in Type 1 format, that are easily installed on any X display.

In fact, the plotting utilities can use most fonts that are available on the current X display. This includes all scalable fonts that have a so-called XLFD (X Logical Font Description) name. For example, the "CharterBT-Roman" font is available on many X displays. It has a formal XLFD name, namely "-bitstream-charter-medium-r-normal--0-0-0-0-p-0-iso8859-1". The plotting utilities would refer to it as "charter-medium-r-normal". The command

echo 0 0 1 1 2 0 | graph -T X -F charter-medium-r-normal

would draw a plot in a popped-up X window, in which all axis ticks are labeled in this font.

You may determine which fonts are available on an X display by using the xlsfonts command. Fonts whose names end in "-0-0-0-0-p-0-iso8859-1" or "-0-0-0-0-m-0-iso8859-1" are scalable ISO-Latin-1 fonts that can be used by libplot's X Plotters and by the plotting utilities that are built on libplot. The two sorts of font are variable-width and fixed-width fonts, respectively. Fonts whose names end in "iso8859-2", etc., and "adobe-fontspecific", may also be used, even though they do not employ the standard ISO-Latin-1 encoding.

The escape sequences that provide access to the non-ASCII 8-bit' characters in the built-in ISO-Latin-1 fonts may be employed when using any ISO-Latin-1 X Window System font. For more on escape sequences, see section Text string format and escape sequences. As an example, "\Po" will yield the British pounds sterling symbol @pounds{'}. The command

echo 0 0 1 1 | graph -T X -F charter-medium-r-normal -L "A \Po1 Plot"

shows how this symbol could be used in a graph label. In the same way, the escape sequences that provide access to mathematical symbols and Greek characters may be employed when using any X Window System font, whether or not it is an ISO-Latin-1 font.

The plotting utilities, including graph, support a --bitmap-size option. It is meaningful only if the -T X' option is used, since it sets the size of the popped-up X Window. You may use it to obtain some interesting visual effects. Each of the plotting utilities assumes that it is drawing in a square region, so if you use the --bitmap-size 800x400' option, your plot will be scaled anisotropically, by a larger factor in the horizontal direction than in the vertical direction. The fonts in the plot will be scaled in the same way. Actually, this requires a modern (X11R6) display. If your X display cannot scale a font, a default scalable font (such as "HersheySerif") will be substituted.

## Text string format and escape sequences

Text strings that are drawn by libplot, and by such applications as graph, plot, tek2plot, pic2plot, and plotfont, which are built on libplot, must consist of printable characters. No embedded control characters, such as newlines or carriage returns, are allowed. Technically, a character is printable' if it comes from either of the two byte ranges 0x20...0x7e and 0xa0...0xff. The former is the printable ASCII range and the latter is the printable 8-bit' range.

Text strings may, however, include embedded escape sequences' that shift the font, append subscripts or superscripts, or include non-ASCII characters and mathematical symbols. As a consequence, the axis labels on a plot prepared with graph may include such features. So may the text strings that pic2plot uses to label objects.

The format of the escape sequences should look familiar to anyone who is familiar with the TeX or groff document formatters. Each escape sequence consists of three characters: a backslash and two additional characters. The most frequently used escape sequences are as follows.

"\sp"
start superscript mode
"\ep"
end superscript mode
"\sb"
start subscript mode
"\eb"
end subscript mode
"\mk"
mark location
"\rt"

For example, the string "x\sp2\ep" would be interpreted as x squared'. Subscripts on subscripts, etc., are allowed. Subscripts and superscripts may be vertically aligned by judicious use of the "\mk" and "\rt" escape sequences. For example, "a\mk\sbi\eb\rt\sp2\ep" produces "a sub i squared", with the exponent 2' placed immediately above the subscript.

There are also escape sequences that switch from font to font within a typeface. For an enumeration of the fonts within each typeface, see section Available text fonts. Suppose for example that the current font is Times-Roman, which is font #1 in the Times' typeface. The string "A \f2very\f1 well labeled axis" would be a string in which the word very' appears in Times-Italic rather than Times-Roman. That is because Times-Italic is the #2 font in the typeface. Font-switching escape sequences are of the form "\fn", where n is the number of the font to be switched to. For compatibility with groff, "\fR", "\fI", "\fB" are equivalent to "\f1", "\f2", "\f3", respectively. "\fP" will switch the font to the previously used font (only one font is remembered). There is currently no support for switching between fonts in different typefaces.

There are also a few escape sequences for horizontal shifts, which are useful for improving horizontal alignment, such as when shifting between italic and non-italic fonts. "\r1", "\r2", "\r4", "\r6", "\r8", and "\r^" are escape sequences that shift right by 1 em, 1/2 em, 1/4 em, 1/6 em, 1/8 em, and 1/12 em, respectively. "\l1", "\l2", "\l4", "\l6", "\l8", and "\l^" are similar, but shift left instead of right. "A \fIvery\r^\fP well labeled axis" would look slightly better than "A \fIvery\fP well labeled axis".

Square roots are handled with the aid of a special pair of escape sequences, together with the "\mk" and "\rt" sequences discussed above. A square root symbol is begun with "\sr", and continued arbitrarily far to the right with the overbar (run') escape sequence, "\rn". For example, the string "\sr\mk\rn\rn\rtab" would be plotted as the square root of ab'. To adjust the length of the overbar, you may need to experiment with the number of times "\rn" appears.

To underline a string, you would use "\ul", the underline escape sequence, one or more times. The "\mk"..."\rt" trick would be employed in the same way. So, for example, "\mk\ul\ul\ul\rtabc" would yield an underlined "abc". To adjust the length of the underline, you may need to experiment with the number of times "\ul" appears. You may also need to use one or more of the abovementioned horizontal shifts. For example, if the "HersheySerif" font were used, "\mk\ul\ul\l8\ul\rtabc" would yield a better underline than "\mk\ul\ul\ul\rtabc".

Besides the preceding escape sequences, there are also escape sequences for the printable non-ASCII characters in each of the built-in ISO-Latin-1 fonts (which means in every built-in font, except for the symbol fonts, the HersheyCyrillic fonts, HersheyEUC, and ZapfDingbats). The useful non-ASCII characters include accented characters among others. Such 8-bit' characters, in the 0xa0...0xff byte range, may be included directly in a text string. But if your terminal does not permit this, you may use the escape sequences for them instead.

There are escape sequences for the mathematical symbols and Greek characters in the symbol fonts, as well. This is how the symbol fonts are usually accessed. Which symbol font the mathematical symbols and Greek characters are taken from depends on whether your current font is a Hershey font or a non-Hershey font. They are taken from the HersheySerifSymbol font or the HersheySansSymbol font in the former case, and from the Symbol font in the latter.

The following are the escape sequences that provide access to the non-ASCII characters of the current font, provided that it is an ISO-Latin-1 font. Each escape sequence is followed by the position of the corresponding character in the ISO-Latin-1 encoding (in decimal), and the official Postscript name of the character. Most names should be self-explanatory. For example, eacute' is a lower-case e', equipped with an acute accent.

"\r!"
[161] exclamdown
"\ct"
[162] cent
"\Po"
[163] sterling
"\Cs"
[164] currency
"\Ye"
[165] yen
"\bb"
[166] brokenbar
"\sc"
[167] section
[168] dieresis
"\co"
"\Of"
[170] ordfeminine
"\Fo"
[171] guillemotleft
"\no"
[172] logicalnot
"\hy"
[173] hyphen
"\rg"
[174] registered
"\a-"
[175] macron
"\de"
[176] degree
"\+-"
[177] plusminus
"\S2"
[178] twosuperior
"\S3"
[179] threesuperior
"\aa"
[180] acute
"\*m"
[181] mu
"\ps"
[182] paragraph
"\md"
[183] periodcentered
"\ac"
[184] cedilla
"\S1"
[185] onesuperior
"\Om"
[186] ordmasculine
"\Fc"
[187] guillemotright
"\14"
[188] onequarter
"\12"
[189] onehalf
"\34"
[190] threequarters
"\r?"
[191] questiondown
"\A"
[192] Agrave
"\'A"
[193] Aacute
"\^A"
[194] Acircumflex
"\~A"
[195] Atilde
"\:A"
"\oA"
[197] Aring
"\AE"
[198] AE
"\,C"
[199] Ccedilla
"\E"
[200] Egrave
"\'E"
[201] Eacute
"\^E"
[202] Ecircumflex
"\:E"
[203] Edieresis
"\I"
[204] Igrave
"\'I"
[205] Iacute
"\^I"
[206] Icircumflex
"\:I"
[207] Idieresis
"\-D"
[208] Eth
"\~N"
[209] Ntilde
"\'O"
[210] Ograve
"\'O"
[211] Oacute
"\^O"
[212] Ocircumflex
"\~O"
[213] Otilde
"\:O"
[214] Odieresis
"\mu"
[215] multiply
"\/O"
[216] Oslash
"\U"
[217] Ugrave
"\'U"
[218] Uacute
"\^U"
[219] Ucircumflex
"\:U"
[220] Udieresis
"\'Y"
[221] Yacute
"\TP"
[222] Thorn
"\ss"
[223] germandbls
"\a"
[224] agrave
"\'a"
[225] aacute
"\^a"
[226] acircumflex
"\~a"
[227] atilde
"\:a"
"\oa"
[229] aring
"\ae"
[230] ae
"\,c"
[231] ccedilla
"\e"
[232] egrave
"\'e"
[233] eacute
"\^e"
[234] ecircumflex
"\:e"
[235] edieresis
"\i"
[236] igrave
"\'i"
[237] iacute
"\^i"
[238] icircumflex
"\:i"
[239] idieresis
"\Sd"
[240] eth
"\~n"
[241] ntilde
"\o"
[242] ograve
"\'o"
[243] oacute
"\^o"
[244] ocircumflex
"\~o"
[245] otilde
"\:o"
[246] odieresis
"\di"
[247] divide
"\/o"
[248] oslash
"\u"
[249] ugrave
"\'u"
[250] uacute
"\^u"
[251] ucircumflex
"\:u"
[252] udieresis
"\'y"
[253] yacute
"\Tp"
[254] thorn
"\:y"
[255] ydieresis

The following are the escape sequences that provide access to mathematical symbols and Greek characters in the current symbol font, whether HersheySerifSymbol or HersheySansSymbol (for Hershey fonts) or Symbol (for Postscript fonts). Each escape sequence is followed by the position (in octal) of the corresponding character in the symbol encoding, and the official Postscript name of the character. Many escape sequences and names should be self-explanatory. "\*a" represents a lower-case Greek alpha, for example. For a table displaying each of the characters below, see the Postscript Language Reference Manual.

"\fa"
[0042] universal
"\te"
[0044] existential
"\st"
[0047] suchthat
"\**"
[0052] asteriskmath
"\=~"
[0100] congruent
"\*A"
[0101] Alpha
"\*B"
[0102] Beta
"\*X"
[0103] Chi
"\*D"
[0104] Delta
"\*E"
[0105] Epsilon
"\*F"
[0106] Phi
"\*G"
[0107] Gamma
"\*Y"
[0110] Eta
"\*I"
[0111] Iota
"\+h"
[0112] theta1
"\*K"
[0113] Kappa
"\*L"
[0114] Lambda
"\*M"
[0115] Mu
"\*N"
[0116] Nu
"\*O"
[0117] Omicron
"\*P"
[0120] Pi
"\*H"
[0121] Theta
"\*R"
[0122] Rho
"\*S"
[0123] Sigma
"\*T"
[0124] Tau
"\*U"
[0125] Upsilon
"\ts"
[0126] sigma1
"\*W"
[0127] Omega
"\*C"
[0130] Xi
"\*Q"
[0131] Psi
"\*Z"
[0132] Zeta
"\tf"
[0134] therefore
"\pp"
[0136] perpendicular
"\ul"
[0137] underline
"\rx"
"\*a"
[0141] alpha
"\*b"
[0142] beta
"\*x"
[0143] chi
"\*d"
[0144] delta
"\*e"
[0145] epsilon
"\*f"
[0146] phi
"\*g"
[0147] gamma
"\*y"
[0150] eta
"\*i"
[0151] iota
"\+f"
[0152] phi1
"\*k"
[0153] kappa
"\*l"
[0154] lambda
"\*m"
[0155] mu
"\*n"
[0156] nu
"\*o"
[0157] omicron
"\*p"
[0160] pi
"\*h"
[0161] theta
"\*r"
[0162] rho
"\*s"
[0163] sigma
"\*t"
[0164] tau
"\*u"
[0165] upsilon
"\+p"
[0166] omega1
"\*w"
[0167] omega
"\*c"
[0170] xi
"\*q"
[0171] psi
"\*z"
[0172] zeta
"\ap"
[0176] similar
"\+U"
[0241] Upsilon1
"\fm"
[0242] minute
"\<="
[0243] lessequal
"\f/"
[0244] fraction
"\if"
[0245] infinity
"\Fn"
[0246] florin
"\CL"
[0247] club
"\DI"
[0250] diamond
"\HE"
[0251] heart
"\SP"
"\<>"
[0253] arrowboth
"\<-"
[0254] arrowleft
"\ua"
[0255] arrowup
"\->"
[0256] arrowright
"\da"
[0257] arrowdown
"\de"
[0260] degree
"\+-"
[0261] plusminus
"\sd"
[0262] second
"\>="
[0263] greaterequal
"\mu"
[0264] multiply
"\pt"
[0265] proportional
"\pd"
[0266] partialdiff
"\bu"
[0267] bullet
"\di"
[0270] divide
"\!="
[0271] notequal
"\=="
[0272] equivalence
"\~~"
[0273] approxequal
"\.."
[0274] ellipsis
NONE
[0275] arrowvertex
"\an"
[0276] arrowhorizex
"\CR"
[0277] carriagereturn
"\Ah"
[0300] aleph
"\Im"
[0301] Ifraktur
"\Re"
[0302] Rfraktur
"\wp"
[0303] weierstrass
"\c*"
[0304] circlemultiply
"\c+"
[0305] circleplus
"\es"
[0306] emptyset
"\ca"
[0307] cap
"\cu"
[0310] cup
"\SS"
[0311] superset
"\ip"
[0312] reflexsuperset
"\n<"
[0313] notsubset
"\SB"
[0314] subset
"\ib"
[0315] reflexsubset
"\mo"
[0316] element
"\nm"
[0317] notelement
"\/_"
[0320] angle
"\gr"
[0321] nabla
"\rg"
[0322] registerserif
"\co"
"\tm"
"\PR"
[0325] product
"\sr"
"\md"
[0327] dotmath
"\no"
[0330] logicalnot
"\AN"
[0331] logicaland
"\OR"
[0332] logicalor
"\hA"
[0333] arrowdblboth
"\lA"
[0334] arrowdblleft
"\uA"
[0335] arrowdblup
"\rA"
[0336] arrowdblright
"\dA"
[0337] arrowdbldown
"\lz"
[0340] lozenge
"\la"
[0341] angleleft
"\RG"
[0342] registersans
"\CO"
"\TM"
"\SU"
[0345] summation
NONE
[0346] parenlefttp
NONE
[0347] parenleftex
NONE
[0350] parenleftbt
"\lc"
[0351] bracketlefttp
NONE
[0352] bracketleftex
"\lf"
[0353] bracketleftbt
"\lt"
[0354] bracelefttp
"\lk"
[0355] braceleftmid
"\lb"
[0356] braceleftbt
"\bv"
[0357] braceex
"\eu"
[0360] euro
"\ra"
[0361] angleright
"\is"
[0362] integral
NONE
[0363] integraltp
NONE
[0364] integralex
NONE
[0365] integralbt
NONE
[0366] parenrighttp
NONE
[0367] parenrightex
NONE
[0370] parenrightbt
"\rc"
[0371] bracketrighttp
NONE
[0372] bracketrightex
"\rf"
[0373] bracketrightbt
"\RT"
[0374] bracerighttp
"\rk"
[0375] bracerightmid
"\rb"
[0376] bracerightbt

Finally, there are escape sequences that apply only if the current font is a Hershey font. Most of these escape sequences provide access to special symbols that belong to no font, and are accessible by no other means. These symbols are of two sorts: miscellaneous, and astronomical or zodiacal. The escape sequences for the miscellaneous symbols are as follows.

"\dd"
daggerdbl
"\dg"
dagger
"\hb"
hbar
"\li"
lineintegral
"\IB"
interbang
"\Lb"
lambdabar
"\~-"
modifiedcongruent
"\-+"
minusplus
"\||"
parallel
"\s-"
[variant form of s]

The final escape sequence in the table above, "\s-", yields a letter rather than a symbol. It is provided because in some Hershey fonts, the shape of the lower-case letter s' differs if it is the last letter in a word. This is the case for HersheyGothicGerman. The German word "besonders", for example, should be written as "besonder\s-" if it is to be rendered correctly in this font. The same is true for the two Hershey symbol fonts, with their Greek alphabets (in Greek text, lower-case final s' is different from lower-case non-final s'). In Hershey fonts where there is no distinction between final and non-final s', "s" and "\s-" are equivalent.

The escape sequences for the astronomical symbols, including the signs for the twelve constellations of the zodiac, are listed in the following table. We stress that that like the preceding miscellaneous escape sequences, they apply only if the current font is a Hershey font.

"\SO"
sun
"\ME"
mercury
"\VE"
venus
"\EA"
earth
"\MA"
mars
"\JU"
jupiter
"\SA"
saturn
"\UR"
uranus
"\NE"
neptune
"\PL"
pluto
"\LU"
moon
"\CT"
comet
"\ST"
star
"\AS"
ascendingnode
"\DE"
descendingnode
"\AR"
aries
"\TA"
taurus
"\GE"
gemini
"\CA"
cancer
"\LE"
leo
"\VI"
virgo
"\LI"
libra
"\SC"
scorpio
"\SG"
sagittarius
"\CP"
capricornus
"\AQ"
aquarius
"\PI"
pisces

The preceding miscellaneous and astronomical symbols are not the only special non-font symbols that can be used if the current font is a Hershey font. The entire library of glyphs digitized by Allen Hershey is built into GNU libplot. So text strings may include any Hershey glyph. Each of the available Hershey glyphs is identified by a four-digit number. Standard Hershey glyph #1 would be specified as "\#H0001". The standard Hershey glyphs range from "\#H0001" to "\#H3999", with a number of gaps. Some additional glyphs designed by others appear in the "\#H4000"..."\#H4194" range. Syllabic Japanese characters (Kana) are located in the "\#H4195"..."\#H4399" range.

You may order a table of nearly all the Hershey glyphs in the "\#H0001"..."\#H3999" range from the U.S. National Technical Information Service, at +1 703 487 4650. Ask for item number PB251845; the current price is about US\$40. By way of example, the string

"\#H0744\#H0745\#H0001\#H0002\#H0003\#H0869\#H0907\#H2330\#H2331"

when drawn will display a shamrock, a fleur-de-lys, cartographic (small) letters A, B, C, a bell, a large circle, a treble clef, and a bass clef. Again, this assumes that the current font is a Hershey font.

You may also use Japanese syllabic characters (Hiragana and Katakana) and ideographic characters (Kanji) when drawing strings in any Hershey font. In all, 603 Kanji are available; these are the same Kanji that are available in the HersheyEUC font. The Japanese characters are indexed according to the JIS X0208 standard for Japanese typography, which represents each character by a two-byte sequence. The file kanji.doc', which is distributed along with the GNU plotting utilities, lists the available Kanji. On most systems it is installed in /usr/share/libplot' or /usr/local/share/libplot'.

Each JIS X0208 character would be specified by an escape sequence which expresses this two-byte sequence as four hexadecimal digits, such as "\#J357e". Both bytes must be in the 0x21...0x7e range in order to define a JIS X0208 character. Kanji are located at "\#J3021" and above. Characters appearing elsewhere in the JIS X0208 encoding may be accessed similarly. For example, Hiragana and Katakana are located in the "\#J2421"..."\#J257e" range, and Roman characters in the "\#J2321"..."\#J237e" range. The file kana.doc', which is installed in the same directory as kanji.doc', lists the encodings of the Hiragana and Katakana. For more on the JIS X0208 standard, see Ken Lunde's Understanding Japanese Information Processing (O'Reilly, 1993), and his on-line supplement.

The Kanji numbering used in A. N. Nelson's Modern Reader's Japanese-English Character Dictionary, a longtime standard, is also supported. (This dictionary is published by C. E. Tuttle and Co., with ISBN 0-8048-0408-7. A revised edition [ISBN 0-8048-2036-8] appeared in 1997, but uses a different numbering.) Nelson' escape sequences for Kanji are similar to JIS X0208 escape sequences, but use four decimal instead of four hexadecimal digits. The file kanji.doc' gives the correspondence between the JIS numbering scheme and the Nelson numbering scheme. For example, "\#N0001" is equivalent to "\#J306c". It also gives the positions of the available Kanji in the Unicode encoding.

All available Kanji have the same width, which is the same as that of the syllabic Japanese characters (Hiragana and Katakana). Each Kanji that is not available will print as an undefined character' glyph (a bundle of horizontal lines). The same is true for non-Kanji JIS X0208 characters that are not available.

## Available marker symbols

The GNU libplot library supports a standard set of marker symbols, numbered 0 through 31. These are the symbols that the graph program will plot at each point of a dataset, if the -S' option is used. The list is as follows (by convention, marker symbol #0 means no symbol at all).

1. dot
2. plus (+)
3. asterisk (*)
4. circle
5. cross
6. square
7. triangle
8. diamond
9. star
10. inverted triangle
11. starburst
12. fancy plus
13. fancy cross
14. fancy square
15. fancy diamond
16. filled circle
17. filled square
18. filled triangle
19. filled diamond
20. filled inverted triangle
21. filled fancy square
22. filled fancy diamond
23. half filled circle
24. half filled square
25. half filled triangle
26. half filled diamond
27. half filled inverted triangle
28. half filled fancy square
29. half filled fancy diamond
30. octagon
31. filled octagon

The interpretation of marker symbols 1 through 5 is the same as in the well known GKS (Graphical Kernel System).

Symbols 32 and up are interpreted as characters in a certain text font. For libplot, it is the current font. For graph, it is the font selected with the --symbol-font-name' option. By default, this is the ZapfDingbats font except in graph -T pnm, graph -T gif, graph -T pcl, graph -T hpgl and graph -T tek. These variants of graph normally have no access to Postscript fonts, so they use the HersheySerif font instead.

Many of the characters in the ZapfDingbats font are suitable for use as marker symbols. For example, character #74 is the Texas star. Doing

echo 0 0 1 2 2 1 3 2 4 0 | graph -T ps -m 0 -S 74 0.1 > plot.ps

will produce a Postscript plot consisting of five data points, not joined by line segments. Each data point will be marked by a Texas star, of a large font size (0.1 times the width of the plotting box).

If you are using graph -T pcl or graph -T hpgl and wish to use font characters as marker symbols, you should consider using the Wingdings font, which is available when producing PCL 5 or HP-GL/2 output. Doing

echo 0 0 1 2 2 1 3 2 4 0 |
graph -T pcl -m 0 --symbol-font Wingdings -S 181 0.1 > plot.pcl

will produce a PCL 5 plot that is similar to the preceding Postscript plot. The Wingdings font has the Texas star in location #181.