Pad++ Programmer's Guide

FONTS


Pad++ supports Adobe Type 1 fonts. The Times and Helvetica fonts are special in that when the system sits idle for a moment, the equivalent X font is loaded and replaces the Pad++ rendering of the text. For this reason, Times and Helvetica fonts look better than other Type 1 fonts. After this refinement, the fonts at that size are much prettier. You can control when and for which size X fonts are used. Font types are specified with the same style that Java fonts are specified. A single string with font family, style, and size completely specifies a font. For example, "Helvetica-bold-14" specifies a 14 point bold Helvetica font. If the style is not specified then plain is assumed, and if size is not specified, then a default of 12 points is used. These font strings can be used wherever Pad++ is expecting a font, such as in the -font itemconfigure option available for many item types.

In order for Pad++ to use Adobe Type 1 fonts, it must be able to find them. These fonts are stored in files with ".pfa" extension. They are typically stored in the /usr/lib/X11/fonts/Type1 or /usr/X11R6/lib/X11/fonts/Type1 directories. These directories are examined by default to see if any Type 1 fonts are stored there. If they are stored elsewhere, Pad++ can be directed to search other directories with the "font path" command (i.e., you could use a command such as ".pad font path /tmp/type1".) You can find which fonts are available on the current system with the "font names" command (i.e., ".pad font names".) See the font command for more detail.

Pad++ comes with a font named "Line". This is a fixed-width vector-font, modeled on courier. It is quite fast, and while readable at smaller sizes, is not very pretty when magnified.


Pad++ Programmer's Guide - 20 JUN 1997

Copyright Computer Science Department, The University of New Mexico

Web Accessibility