|
Note, the Count version 2.6 has TrueType support ON by default in Makefiles.
Here are the steps to add TrueType support to the counter in Unix:
Counter Parameters related to TTF
<img src="/cgi-bin/Count.cgi?font=trebuc.ttf&bg=0000ff&fg=ffffff">
<img src="/cgi-bin/Count.cgi?font=trebuc.ttf">
Few links about free TrueType fonts: (just to get you started)
Style | Image strip | Author |
A |
designed by the author. D, H, M, S segment added by
Andrew Taylor
(digits/A/strip.gif) |
|
---|---|---|
B | Borrowed from HTML-access counter. (digits/B/strip.gif) | |
C |
designed by benjamin@pop3.oro.net (digits/C/strip.gif) |
|
D |
designed by the author (digits/D/strip.gif) |
|
E |
designed by the author (digits/E/strip.gif) |
|
cd |
made by the author on SGI with GIMP
running on Linux. D,H,M and S are
needed for countdown option.
(digits/cd/strip.gif) |
|
cdr |
Contributed by
Mike Casper.
(digits/cdr/strip.gif) |
|
cdd |
Contributed by
Sebastian Hartman
(digits/cdd/strip.gif) |
|
bang |
Bangla digits.
Made with GIMP by the author.
(digits/bang/strip.gif) |
For a huge collection of GIF digits, check out the Digit Mania page. If you design some cool digits and like to share with others try sending them to Digit Mania instead of me.
This program will work with any digits from the Digit Mania page.
To use those digits, create subdirectories say, F, G, H, foo etc. inside the
digits directory and rename the images to zero.gif, one.gif..nine.gif.
I suggest you create an image strip out of these digits and use it instead of
using individual images.
How to use other styles of digits
There are several sites including
Digit Mania
which maintains a array of collection of GIF digits which can be used with
the counter. The counter program can use these digits in 2 ways.
zero.gif, one.gif, two.gif, ... nine.gif, colon.gif, am.gif,
pm.gif, comma.gif and dash.gif
The section How to create an image strip describes how to create an image strip from individual digit images. If you like to use the individual digits instead, you must use the option istrip=F when you call the counter from web page, because by default istrip=T.
How to create an image strip
If you have individual digit images, you can create an image strip out of
them. Image strip reduces disk i/o significantly, because the counter will
need to read only one image instead of many and the size of the image
in most cases will be less than the combined size of the individual images.
A program called mkstrip is supplied to create the image strip from individual digit images. Another program called extdgts is supplied to extract individual GIF images from the strip.gif (made with mkstrip). extdgts is there to help you out if you need to extract the digit images for some reason.
The programs mkstrip and extdgts compiled automatically and copied to the bin diectory located in counter source directory. Before using them, copy mkstrip and extdgts somewhere in your path, otherwise you'll get error "command not found."
Now, go to the directory where all the individual digit images are and type:
mkstrip zero.gif one.gif two.gif .... nine.gif colon.gif \ am.gif pm.gif > strip.gifNote, the file names are not important but the order is very important. For example, the file names may be 0x.gif, 1x.gif etc.
Create a directory say F inside the digits directory and copy or move the file strip.gif to F. You can use this strip with dd=F.
The above strip can be used for counter and clock but not date. It also can NOT be used if you want to display comma. If you want to use date and comma, you must have the image for comma and dash. For example, the strip of digit style A is created with the command:
mkstrip zero.gif one.gif ... nine.gif colon.gif am.gif pm.gif comma.gif \ dash.gif > strip.gifPlease note the order of the images used in arguments carefully. The program mkstrip puts the necessary information in the GIF comment extension about the strip. The counter program parses the comment extension to determine the width of the individual digits in the strip. Therefore, the strip can have digit segments of variable width.
For example, the comment of the image strip of digit style A is:
15:0:15:30:45:60:75:90:105:120:135:150:165:180:195:210:225The leftmost integer 15 indicates there are 15 individual digits in the image and the next colon separated pairs are the location of left and right side of the segment of the individual images from the leftmost edge. If you look carefully you will see that the individual segment of the strip is 15 pixel wide. The height is determined by reading the image. If you use the program mkstrip, you do not need to know anything about the comment, it will be created correctly for you. It is mentioned here because it is possible you obtained a strip from somewhere and you want to add the comment to the image.
|