|
|
|
|
|
Determining Available Fonts |
|
|
|
|
|
|
|
|
In Unix, you must specify fonts by using a long, drawn-out syntax with a lot of asterisks that represent families, size, type, and so on. In the X Window System, you can get a list of Unix fonts by running the command |
|
|
|
 |
|
|
|
|
xlsfonts > font_file |
|
|
|
|
|
|
|
|
The file named font_file will now contain a huge list of fonts that you can use on your system. Be careful when picking fonts from this huge list. If you are going to be running your application from more than one system, the font you pick might not be available on all systems. |
|
|
|
|
|
|
|
|
If you use Microsoft Windows, you'll have a different way of seeing what fonts are available. Click on the Start menu and select Settings (r) Control Panel. Once the Control Panel appears, double-click Fonts and a window similar to the one shown in Figure C-1 appears. |
|
|
|
|
|
|
|
|
Figure C-1.
The Fonts from a Windows 95 System |
|
|
|
|
|
|
|
|
My system has most of the standard fonts and a few that I've downloaded over the Internet, such as augie and Bard. If I want to use these fonts I have to know how to specify them. If you double-click on a font name, another window appears and displays detailed information about the font (see Figure C-2). |
|
|
|
|
|
|
|
|
The information about the font includes how much space it takes up on the hard drive (64K in this case), what version it is, and its name. It also lists the available sizes. The Arial font starts at 12 points and goes up to 72 points. To use the -font option to specify this font for a widget (for instance, a button), you need to know the name of the font (Arial), the size, and the type (normal, bold, or italic). With these |
|
|
|
|