163
>: normal simple font
186
>: normal (sans-serif) font
194
>: roman (serif) font
226
> The advantages of the unicode fonts over the more traditional PLplot
227
Hershey fonts are the availability of many additional glyphs
228
(including mathematical symbols and glyphs from other than
229
western-European languages) and much better display of characters on
230
computer screens using anti-aliasing and hinting. Unicode fonts are
231
obtained by specifying a command-line option of -drvopt text for
232
the devices (currently ps, psc, png, jpeg, gif, gcw, and wingcc)
233
where it has been implemented.
236
> For the ps and psc devices, there is a fixed relationship between the
237
FCI (font characterization integer, see <A
238
HREF="characters.html#fci"
239
>the Section called <I
243
and the actual Type 1
244
fonts that are being used. This fixed relationship is specified in
245
the Type1Lookup array in include/plfci.h. This array maps the
246
font-family attributes of sans-serif, serif, monotype, script, and
247
symbol to the standard postscript font families called Helvetica,
248
Times-Roman, Courier, Times-Roman, and Symbol. (There is no script
249
font family amongst the 35 standard Type 1 postscript fonts so that is
250
why we map the font-family attribute of script to Times-Roman.)
251
Similarly, this array maps the font-style attributes of upright,
252
italic or oblique and the font-weight attributes of medium or bold to
253
the appropriate variety of the Helvetica, Times-Roman, Courier,
254
and Symbol font families that are part of the
255
35 standard Type 1 postscript fonts. These standard postscript fonts
256
are normally installed on a user's system using the gsfonts package.
259
> For the devices handled by the FreeType library (currently png, jpeg,
260
and gif) there is a configurable relationship between the FCI (font
261
characterization integer, see <A
262
HREF="characters.html#fci"
263
>the Section called <I
267
and the TrueType fonts that are actually used.
270
> On Unix/Linux systems, the TrueType fonts corresponding to the 30 possible
271
valid FCIs can be specified using ./configure options. (Use
272
./configure --help to see the possibilities and also the default
273
values for the fonts.) These ./configure defaults for the 30
274
possibilites are taken from fonts available from the ttf-freefont font
275
package. We recommend this font package because it has a rather
276
complete set of glyphs for most unicode blocks. (We also recommend
277
the gucharmap application for determining other unicode font
278
possibilities on your system that are available via the FreeType
282
> On Windows systems, the fixed default TrueType fonts are specified in the
283
include/plfci.h file. (NOT PROGRAMMED YET, so this statement
284
will probably NEED REVISION.)
287
> For all systems, the 30 possible TrueType fonts can be specified at run
288
time using the following environment variables:
294
> PLPLOT_FREETYPE_SANS_FONT
299
> PLPLOT_FREETYPE_SERIF_FONT
304
> PLPLOT_FREETYPE_MONO_FONT
309
> PLPLOT_FREETYPE_SCRIPT_FONT
314
> PLPLOT_FREETYPE_SYMBOL_FONT
319
> PLPLOT_FREETYPE_SANS_ITALIC_FONT
324
> PLPLOT_FREETYPE_SERIF_ITALIC_FONT
329
> PLPLOT_FREETYPE_MONO_ITALIC_FONT
334
> PLPLOT_FREETYPE_SCRIPT_ITALIC_FONT
339
> PLPLOT_FREETYPE_SYMBOL_ITALIC_FONT
344
> PLPLOT_FREETYPE_SANS_OBLIQUE_FONT
349
> PLPLOT_FREETYPE_SERIF_OBLIQUE_FONT
354
> PLPLOT_FREETYPE_MONO_OBLIQUE_FONT
359
> PLPLOT_FREETYPE_SCRIPT_OBLIQUE_FONT
364
> PLPLOT_FREETYPE_SYMBOL_OBLIQUE_FONT
369
> PLPLOT_FREETYPE_SANS_BOLD_FONT
374
> PLPLOT_FREETYPE_SERIF_BOLD_FONT
379
> PLPLOT_FREETYPE_MONO_BOLD_FONT
384
> PLPLOT_FREETYPE_SCRIPT_BOLD_FONT
389
> PLPLOT_FREETYPE_SYMBOL_BOLD_FONT
394
> PLPLOT_FREETYPE_SANS_BOLD_ITALIC_FONT
399
> PLPLOT_FREETYPE_SERIF_BOLD_ITALIC_FONT
404
> PLPLOT_FREETYPE_MONO_BOLD_ITALIC_FONT
409
> PLPLOT_FREETYPE_SCRIPT_BOLD_ITALIC_FONT
414
> PLPLOT_FREETYPE_SYMBOL_BOLD_ITALIC_FONT
419
> PLPLOT_FREETYPE_SANS_BOLD_OBLIQUE_FONT
424
> PLPLOT_FREETYPE_SERIF_BOLD_OBLIQUE_FONT
429
> PLPLOT_FREETYPE_MONO_BOLD_OBLIQUE_FONT
434
> PLPLOT_FREETYPE_SCRIPT_BOLD_OBLIQUE_FONT
439
> PLPLOT_FREETYPE_SYMBOL_BOLD_OBLIQUE_FONT
444
On Unix/Linux systems if these environment variables are not specified
445
with an absolute path starting with "/", then the absolute path is
446
specified by the configured default (see ./configure --help) or at
448
environment variable PLPLOT_FREETYPE_FONT_DIR.
460
> We specify the properties of unicode fonts with the FCI (font
461
characterization integer). The FCI is a 32-bit unsigned integer whose
462
most significant hexadecimal digit is marked with an 0x8 (0x80000000
463
is ORed with the FCI value to mark it) to distinguish it from a unicode
464
(UCS4) integer (whose maximum value 0x7fffffff). Users obtain the
465
current FCI by calling <A
471
> and store a new FCI to be used at the
472
start of each subsequent string using <A
479
hexadecimal values within the FCI are characterized by the hexdigit
480
and hexpower. The hexpower is defined as the power of 16 or number of
481
hexadecimal places to the left of the "decimal place" in the FCI
482
where the hexdigit is stored. The interpretation of the hexdigit and
483
hexpower values in the FCI are given in <A
484
HREF="characters.html#fci-table"
495
>Table 3-3. FCI interpretation</B
501
><COL><COL><COL><COL><COL><COL><COL><TBODY
507
>hexdigit --></TD
587
> Note the maximum value of hexdigit is 7 and the maximum value of
588
hexpower is 6 so there is substantial room for expansion of this
589
scheme. On the other hand, since each font attribute is independent
590
of the rest, what is implemented now gives us a maximum of 30
591
different font possibilities which is probably more than enough for
592
most plotting purposes.
600
NAME="escape-sequences"
601
>Escape sequences in text</A
604
> The routines which draw text all allow you to include escape
605
sequences in the text to be plotted. These are character sequences
606
that are interpreted as instructions to change fonts, draw
607
superscripts and subscripts, draw non-ASCII (e.g. Greek), and so on.
608
All escape sequences start with a number symbol
612
>) by default. Some language interfaces have
613
the capability of changing this default, but we will assume
617
>) in the remaining documentation of the escape
621
> The following escape sequences are defined:
631
>: move up to the superscript position
643
>: move down to subscript position
655
>: backspace (to allow overprinting)
671
>: toggle overline mode
679
>: toggle underline mode
687
>: Greek letter corresponding to Roman
699
>: switch to normal (sans-serif) font
707
>: switch to Roman (serif) font
715
>: switch to italic font
723
>: switch to script font
731
>: Hershey character nnn (1 to 4
740
>: unicode character nnn (nnn can
741
be decimal or hexadecimal [e.g., starting with 0x]) (UNICODE ONLY).
748
>#<0x8nnnnnnn></TT
749
>: absolute FCI to be used to
750
change fonts in mid-string. (nnnnnnn must be exactly 7
751
digits). (UNICODE ONLY).
759
>: change just one attribute
760
of the FCI in mid-string where m is the hexdigit and n is
761
the hexpower. If more than two digits are given (so long
762
as the eigth digit does not mark this as an absolute FCI, see
764
are ignored. (UNICODE ONLY).
771
>#<FCI COMMAND STRING/></TT
773
STRING is currently one of "sans-serif", "serif", "monospace",
774
"script", "symbol", "upright", "italic", "oblique" "medium",
775
or "bold" (without the surrounding quotes). These FCI
776
COMMAND STRINGS change one attribute of the FCI according to
777
their name. (UNICODE ONLY).
784
> Sections of text can have an underline or overline appended. For
785
example, the string <SPAN
791
>) is obtained by specifying
794
>"#+S#+(#-freq#-)"</TT
798
> Greek letters are obtained by <TT
803
HREF="characters.html#greek"
805
> shows how these letters map
806
into Greek characters.
815
>Table 3-4. Roman Characters Corresponding to Greek Characters</B
823
ALIGN="center"><COL><COL><COL><COL><COL><COL><COL><COL><COL><COL><COL><COL><TBODY
889
ALIGN="center"><COL><COL><COL><COL><COL><COL><COL><COL><COL><COL><COL><COL><TBODY
954
ALIGN="center"><COL><COL><COL><COL><COL><COL><COL><COL><COL><COL><COL><COL><TBODY
1019
ALIGN="center"><COL><COL><COL><COL><COL><COL><COL><COL><COL><COL><COL><COL><TBODY
1080
> The escape sequences <TT
1097
> are designed for the four Hershey fonts, but
1098
an effort has been made to allow some limited forward compatibility so
1099
these escape sequences have a reasonable result when unicode
1100
fonts are being used. However, for maximum flexibility when using
1101
unicode fonts, these 5 escape sequences should be replaced by using
1102
the 4 escape sequences <TT
1108
><0x8nnnnnnn></TT
1125
NAME="character-size"
1126
>Character size adjustment</A
194
1129
> The routine <A
195
1130
HREF="plschr.html"