Manual page for Fonts(PL)

Google




Fonts


Welcome     Gallery     Handbook


What fonts are available?

This depends on what output format you are producing, since Ploticus does not include its own internal fonts.


PNG, GIF, etc.

If the default built-in GD code is used, a basic ascii font is available in 5 sizes (you can specify any point size in ploticus; the nearest available size will be used). You can't set the font from ploticus; -font (etc.) will have no effect. Vertical rendering is available. Availability of symbols and nonroman characters is limited to those in ASCII extended range. Note: some characters in the GD extended range don't agree with X11 or PostScript (there were apparently conflicting standards defining extended ascii). The GD character set is defined in gdfontg.c, which may be modified to suit if necessary.


PNG, JPEG, WBMP with FreeType2 support

If your ploticus build uses GD with FreeType2 support, you can use TrueType fonts. The basic GD ascii font is also available in 5 sizes, and is the default (its name is ascii should you need to use it explicitly). You can set the font from ploticus using -font, proc page font attribute, or font in any textdetails attribute. TrueType font names should be given without the .ttf extension, e.g. if you have a font file called times.ttf you would use
-font times

You will need to have some TrueType .ttf font files stored in a directory somewhere. The environment variable GDFONTPATH must be set to contain the pathname of this directory. TrueType font files may be found on NT machines in c:/winnt/fonts or they may be downloaded on the web.

Vertical rendering is available. Availability of symbols and nonroman characters: Constructs such as &#192 may be used, and unicode fonts can be used (see below).

Here is an example rendered using TTF sans serif font. For more information on building ploticus to use FreeType2, see ./src/FreeType2 and ./src/Makefile.


PostScript, EPS

Uses PostScript fonts. The default font is /Helvetica. You can set the font from ploticus using -font, proc page font attribute, or font in any textdetails attribute, for example:
-font /Helvetica-Oblique

Usually these fonts are available: /Helvetica /Helvica-Oblique /Helvetica-Bold /Helvetica-BoldOblique /Times-Roman /Times-Bold; many others are usually available as well. Vertical rendering is available. Availability of symbols and nonroman characters: As of version 2.01, the ploticus postscript driver supports ISO-LATIN encoding, so that European characters and symbols in ASCII extended range may be used. You can use the troff-like special characters feature that uses the /Symbols font.


SVG

If you're using SVG , font availablility and naming depends on the environment in effect where the SVG file is being viewed, ie. if you're viewing on MSIE on a win32 system see the list of fonts available in MS Word. SVG viewing environments generally are "intelligent" about font selection and substituting.

Ploticus uses a Helvetica as the default font. I've also used Courier, Times-Roman, Bookman, Stencil, Magneto, etc. You can set the font from ploticus using -font, proc page font attribute, or font in any textdetails attribute, for example:

-font Times-Roman

Vertical rendering is available. European characters and symbols in ASCII extended range may be used. Constructs such as &#192 may be used, and unicode fonts can be used (see below) with utf-8 encoding.


X11

Always uses the same fixed width font. You can't set the font from ploticus; -font (etc.) will have no effect. Depending on availablility, this will be either -adobe-courier-bold-r-normal, -misc-fixed-medium-r-normal, or as a last resort, 9x15. Proper vertical rendering is not available. Availability of symbols and nonroman characters is limited to those in ASCII extended range.


UNICODE FONTS

Unicode fonts may be used for titles, labels, tags, category names, etc. in the script or in data, if you are rendering in SVG or PNG/JPEG with FreeType2 (versions 2.05+). Unicode is not yet supported within dates.

Your ploticus script or prefab parameters should be utf-8 encoded. You will need a unicode TTF font such as Bitstream Cyberbit (freely downloadable on the internet). Set ploticus to use this font. For SVG, set the XML encoding to utf-8. Font and XML encoding can be set using proc settings , from the pl command line , or in a config file. ). PNG/JPEG can be viewed by standard means, since the fonts have already been rendered and do not need to be available to the viewer application. SVG must be viewed by an application that has access to your Unicode font(s) and as ZZtop says, "knows how to use them"; MSIE browser currently seems to do the best job.


EXAMPLES

This example shows the ascii and Western European range that is available by default.




This example demonstrates rendering of Chinese using a unicode font.




data display engine  
Copyright Steve Grubb


Markup created by unroff 1.0,    December 10, 2002.