<HTML> <HEAD> <TITLE>XBanner: Font Tips</TITLE> </HEAD> <!BODY BGCOLOR="white"> <BODY BGCOLOR="#551A8B" TEXT="white" LINK="cyan" VLINK="green" ALINK="red"> <H1>XBanner Font Tips</H1> <HR> <H3>Contents</H3> <!-- AS-TOC_BEGIN{ --> <UL> <LI><A HREF="#as-h3-16686">Font Directories</A> <LI><A HREF="#as-h3-16687">Finding Fonts</A> <LI><A HREF="#as-h3-16688">Analyzing A Font</A> <LI><A HREF="#as-h3-16689">What Else?</A> </UL> <!-- AS-TOC_END} --> <H3><A NAME="as-h3-16686">Font Directories</A></H3> <P> When going to find a font, the first thing you need to do is check where the font directories are located on your X-Server. On my machine, I type xset q like this: <P> <PRE> <CODE><B>GGF root 84:~/Xbanner#</B> <I>xset q</I> Keyboard Control: auto repeat: on key click percent: 0 LED mask: 02000000 auto repeating keys: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 bell percent: 50 bell pitch: 400 bell duration: 100 Pointer Control: acceleration: 2/1 threshold: 4 Screen Saver: prefer blanking: yes allow exposures: yes timeout: 600 cycle: 600 Colors: default colormap: 0x21 BlackPixel: 1 WhitePixel: 0 Font Path: /usr/X11R6/lib/X11/fonts/misc/, /usr/X11R6/lib/X11/fonts/Type1/, <= Scalable fonts! /usr/X11R6/lib/X11/fonts/Speedo/, <= Scalable fonts! /usr/X11R6/lib/X11/fonts/75dpi/, /usr/X11R6/lib/X11/fonts/100dpi/, Bug Mode: compatibility mode is disabled </CODE> </PRE> <H3><A NAME="as-h3-16687">Finding Fonts</A></H3> <P> If you don't have these, you'll have to install them. The distribution of XFree86 has them as a separate file, so you just need to use the <CODE>tar</CODE> command to find out exactly which file it is. <P> If you <B>do</B> have these directories in the font path, you might want to try and use the <CODE>xfontsel</CODE> utility. This will help you a lot. Once you selected the font you want, there is an option to simply paste the font name with the mouse into any other window. <P> See the font path at the end of the above example? The <CODE>Type1/</CODE> and <CODE>Speedo/</CODE> directories contain scalable fonts. Use '<CODE>cd /usr/X11R6/lib/X11/fonts/Type1/</CODE>' and view the file '<CODE>fonts.dir</CODE>' in that directory. You will see something like: <PRE> 16 <B><<< <I>number of fonts in this directory</I></B> UTRG____.pfa -adobe-utopia-medium-r-normal--0-0-0-0-p-0-iso8859-1 UTI_____.pfa -adobe-utopia-medium-i-normal--0-0-0-0-p-0-iso8859-1 UTB_____.pfa -adobe-utopia-bold-r-normal--0-0-0-0-p-0-iso8859-1 UTBI____.pfa -adobe-utopia-bold-i-normal--0-0-0-0-p-0-iso8859-1 cour.pfa -adobe-courier-medium-r-normal--0-0-0-0-m-0-iso8859-1 couri.pfa -adobe-courier-medium-i-normal--0-0-0-0-m-0-iso8859-1 courb.pfa -adobe-courier-bold-r-normal--0-0-0-0-m-0-iso8859-1 courbi.pfa -adobe-courier-bold-i-normal--0-0-0-0-m-0-iso8859-1 c0648bt_.pfb -bitstream-charter-medium-r-normal--0-0-0-0-p-0-iso8859-1 c0649bt_.pfb -bitstream-charter-medium-i-normal--0-0-0-0-p-0-iso8859-1 c0632bt_.pfb -bitstream-charter-bold-r-normal--0-0-0-0-p-0-iso8859-1 c0633bt_.pfb -bitstream-charter-bold-i-normal--0-0-0-0-p-0-iso8859-1 c0419bt_.pfb -bitstream-courier-medium-r-normal--0-0-0-0-m-0-iso8859-1 c0582bt_.pfb -bitstream-courier-medium-i-normal--0-0-0-0-m-0-iso8859-1 c0583bt_.pfb -bitstream-courier-bold-r-normal--0-0-0-0-m-0-iso8859-1 c0611bt_.pfb -bitstream-courier-bold-i-normal--0-0-0-0-m-0-iso8859-1 <B>------------ ------------------------------------------------------------ <I>File Name Font Name</I></B> </PRE> <H3><A NAME="as-h3-16688">Analyzing A Font</A></H3> <P> Let's look at one of these fonts: <P> <CODE>-bitstream-charter-bold-r-normal--0-0-0-0-p-0-iso8859-1</CODE> <P> This is how it looks in the '<CODE>fonts.dir</CODE>' file. When we want to use a font, some of the font's fields can be specified as wildcards. The 0's specify that this field can be asked-for arbitrarily. This means that if we ask for a font: <P> <CODE>-bitstream-charter-bold-r-normal--100-*-75-75-*-*-iso8859-1</CODE> <P> The X-Server will generate for us a font of 100 pixels size, at 75 dpi resolution. <H3><A NAME="as-h3-16689">What Else?</A></H3> <P> Another way to find out about the fonts in your system is to query the X-Server by using "xlsfonts". Try to look for fonts with pixel-sizes of 0 (zero) in the output of xlsfonts. These are likely to be scalable. <P> Notice that some scalable fonts are bitmap scalable fonts, which means they look awful when scaled to very large sizes. You really do want to use those <CODE>Type1</CODE> and <CODE>Speedo</CODE> fonts! <P> So... All you need to do is experiment. <P> <A HREF="index.html">Back to Index</A> </BODY> </HTML>