VRweb fonts

This directory contains font files for use with VRweb 1.3.

Part of the current distribution are the following two fonts:

The fonts usually reside in ~/.vrweb/fonts unless you have stated a different directory with Xattribute fontDir.

We hope to be able to distribute more fonts in future releases (currently Sanserif is also used to approximate Typewriter). The font format is quite simple, so you may wish to experiment on converting fonts from other sources into VRweb's font format.

The following chapters handle file name conventions, describe the file format, and discuss potential font sources.

None of these topics will be of interest for you, if you are happy browsing VRML worlds with the fonts provided.

Font file names

Font files loaded by VRweb follow this naming scheme:


where [base] can be chosen arbitrarily (Xattribute fontFileBase). [family] is one of serf (Serif/Roman), sans (Sanserif/Helvetica) or type (Typewriter/Courier) and is selected according to family of the FontStyle.

The [style] part of the filename can be empty (normal font), b (bold), i (italic) or bi (bold italic). Missing italic fonts are substituted by slanting normal fonts, bold fonts are approximated by increasing the line width. [suffix] must be wrl for VRweb 1.3, future versions may read gzipped fonts too.

The files of the distribution were given a prefix of wf (for wireframe fonts).

File format

The files are in standard VRML 1.0 format. To let VRweb find the character glyphs they should have the following structure:

#VRML V1.0 ascii

Separator {
    ShapeHints { creaseAngle 0.0 }
    DEF chr0x21 Separator { ... }
    DEF chr0x41 Separator { ... }
Characters are labeled with their hexadecimal ASCII code (0x21 is '!', 0x41 is 'A'), and need not be in any particular order. creaseAngle 0.0 turns off autosmoothing for flat fonts. Inside the character definitions, other nodes than Coordinate3, IndexedFaceSet and IndexedLineSet should not be used to avoid side effects with the scene graph.

Font characters should be in the xy-plane (x to the right, y up, z==0). The height of the font should be chosen such that multiple lines 10 units vertically away from each other look properly spaced. The base line of the font is at y==0. Horicontal spacing refers to x==0 and the right border of each character, thus negative x values can be used to let characters jut out over the space to the previous one (e.g. 'j').

Font Sources

Public sources for stroke/polygonal fonts are quite rare. We used the Hershey fonts (also used in the Harmony 3D Information Landscape) for the distribution, another alternative would be the PEX fonts of the X11R6 distribution (also used by GLUT).

We have also written a script converting Inventor font data to VRML (only runs on SGIs). Due to potential legal and definitive performance issues the script is not distributed. Solid fonts are slower to render (under OpenGL you can use Line-Antialiasing for nice font outlooks).

If you know about other suitable font sources, please inform us by mail.

Last updated: Michael Pichler, 13 Sep 1996.