| Ken Shirriff -> Java -> Fonts -> Banner |
Banner is easy to use. To use it, you first need to unzip pcffont.zip into a directory "pcffont". Next, you need to copy the appropriate font into a directory "pcf". Next, get Banner.class. Finally, add an applet tag to your html file; the following tag generates the above banner.
<applet code="Banner.class" align=middle width=700 height=50> <param name="font" value="pcf/Goofball20.pcf"> <param name="text" value="You can put your message here!"> <param name="fg" value="blue"> <param name="bg" value="#ff0000"> </applet>
The font and text parameters are required to
specify the font file and text string.
The fg and bg parameters are optional and specify
the foreground and background colors as either a color name
or a #rrggbb value.
The margin parameter is optional and specifies the number of
pixels in the margin between the text and the top of the applet.
The delay and step parameters are optional and
specify the delay in ms between movements of the banner and the number of
pixels to move per step respectively. If step is negative,
the text will scroll backwards.
If an offset value is specified, the characters will be shifted
by this offset. A value of 127 may be useful to get special characters in
some fonts.
The backwards value will print the string backwards, which is
useful in languages such as Hebrew.
The source for Banner is here.
Back to my Java PCFFont class page.