X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fbb9d,f2448f9b6e6f5120,start X-Google-Attributes: gidfbb9d,public X-Google-ArrivalTime: 1994-10-23 13:18:29 PST Path: bga.com!news.sprintlink.net!sashimi.wwa.com!not-for-mail From: Tony Nugent Newsgroups: rec.arts.ascii Subject: Talk: Exterminate Duplicate flf Files! Line: Examples Date: 23 Oct 1994 15:17:37 -0500 Organization: Griffith University, Brisbane, Australia Lines: 191 Sender: boba@wwa.com Approved: boba@wwa.com Message-ID: <38egd1$jj7@sashimi.wwa.com> Reply-To: T.Nugent@sct.gu.edu.au NNTP-Posting-Host: sashimi.wwa.com Hi all! This has turned out to be a rather long-winded rave. If figlet fonts don't interest you, then skip this. But if you use figlet and want to get the most out of it, then read on! I've been having a good look at a few of my flf files, and found a whole bunch of them to be EXACTLY THE SAME!!! Ok ok... they LOOK different, but I can produce each of these fonts from only ONE flf file. The specific fonts I am talking about is the "catwalk" or "1-2-2" series. This includes the following nine figlet font files, which can ultimately be replaced by one: barbwire.flf catwalk.flf coinstak.flf diamond.flf marquee.flf nipples.flf stellar.flf tiles.flf tubular.flf Now, I haven't made a full check on all the 90-odd fonts, so there may be (read: probably) more that would fall into this particular series. And there's probably many fonts that you could group together that have similar basic characteristics. All credit to the original authors though (whoever they may be - I haven't even checked) - they are all really nice fonts. But they are the same! To show you what I mean: Ok, this is catwalk... echo 12345 | figlet -c -f catwalk _// _// _/ _// _// _// _// _/// _// _/ _// _// _ _// _// _// _// _// _/ _// _/// _// _// _// _// _// _// _// _// _//_//// _/ _// _// _///// _//////// _///// _// _/// _// and this is barbwire... echo 12345 | figlet -c -f barbwire ><< ><< >< ><< ><< ><< ><< ><<< ><< >< ><< ><< > ><< ><< ><< ><< ><< >< ><< ><<< ><< ><< ><< ><< ><< ><< ><< ><< ><<><<<< >< ><< ><< ><<<<><<<<<<<< ><<<<< ><< ><<< ><< which is *exactly* the same result you can get if you did this... echo 12345 | figlet -c -f catwalk | tr '_/' '><' It's the tr command that's the key to this of course, and in other posts I've talked about its use. What I'm explaining here further illustrates the original point about all this - that many font files are duplicates and are unnecessary and redundant. (This is something that Anthony Thysson first pointed out a little while ago). To produce this font | Pipe the figlet output | Size of from catwalk.flf | through this tr command | flf file ---------------------+----------------------------+---------- barbwire.flf | tr '_/' '><' | 8423 coinstak.flf | tr '_/' 'O)' | 8391 diamond.flf | tr '_/' '/\\' | 8478 marquee.flf | tr '_/' '.\:' | 8382 nipples.flf | tr '_/' '{_' | 8422 stellar.flf | tr '_/' '`.' | 8422 tiles.flf | tr '_/' '\[.' | 8420 tubular.flf | tr '_/' 'O~' | 8422 I suspect that the only real difference between the files that contributes to the slight variation in size are the header comments. catwalk.flf itself is 8478 bytes, and the combined size of all the above fonts totals just under 70,000 bytes. In one swoop I can delete them all and save this amount of disk space! And this is great when I'm living in an account with tight quota limits. And not only that, by varying the actual characters tr substitutes, I can produce any number of totally new fonts! Ok, I'll invent a new font right now! Let's substitute +- for _/ with tr... +-- +-- +- +-- +-- +-- +-- +--- +-- +- +-- +-- + +-- +-- +-- +-- +-- +- +-- +--- +-- +-- +-- +-- +-- +-- +-- +-- +--+---- +- +-- +-- +----- +-------- +----- +-- +--- +-- Hmm, not too bad. +~ *~ and @~ are also good combinations :) Geez - I just invented FOUR more! :-) What shall I name them?... I've called this the 1-2-2 series. I'll show you why: echo 12345 | figlet -c -f catwalk | tr '_/' '12' 122 122 12 122 122 122 122 1222 122 12 122 122 1 122 122 122 122 122 12 122 1222 122 122 122 122 122 122 122 122 12212222 12 122 122 122222 122222222 122222 122 1222 122 See the pattern? Now, the capability to translate characters to produce these results gives a whole set of new possibilities to figlet. I've suggested this before: it would be a powerful enhancement if character translation (and translation of *sets* of characters - an even more powerful enhancement that goes beyond the capabilities of tr itself) was built right into figlet. This could be done via command-line switches, environment variables, and figlet control files could be well utilised for this purpose (see below). The source code to tr is freely available, so it shouldn't be a major task to incorporate such a feature into a future version of figlet! oak.oakland.edu :: /SimTel/msdos/textutil/tr112.zip This is a dos port of tr, and it has source code with it! I'm sure unix source is available just as readily. Actually, filget has some of the basis of these ideas ALREADY built into it! At least the basics of a tr-type translation routine already exists within it. (Check the figlet man pages in the control files section, and the upper.flc file that comes with figlet 2.1). Control files have a character translation command - the t command. But the translation is made on INPUT characters, and it has no affect the translation of OUTPUT characters. What is being suggested is some new syntax to specify particular *sets* of output character translations within control files. That way, one .flc file could contain *several* output translation commands, maybe even specifying the use of a particular "base" font. Each particular translation would have a unique "tag name" - similar to just naming a font, but rather than existing as actual font files, they are font names by translation from another font. Environment variables could also be used to specify which control file figlet should use by default. Anyway, this is now getting a bit technical. What I really wanted to point out are those nine figlet fonts that are the same beast in different disguises. I'm sure that other sets of fonts can be found among the rest of the ~90 fonts. So the task needs to be done - which fonts ARE similar (which makes them - all but one - redundant), and how many different sets of fonts are there among the 90 or so that do exist? If no one has a look, and I still manage to hold my account after the end of this year, I will be happy to check them all myself and sort them out to identify (and perhaps "classify") the "base" fonts. Cheers @@@@@@@@@@@ @@@@@@@@ @@@@ @@@ @@@ @@@ @!@ @!@ @!@ @!@!@ @!@ @!@ @!@ !@! !@! !@! @!@!@! !@! !@! !@! !:! !:! !@! !:! !@! !:! !:!!@ !:! !:! !:! !:! !:!:!: !:! :!: :!: :!: :!: :!:!: :!: ::: :::::::: ::: :::: ::: @@@@ @@@ @@@ @@@ @@@@@@@@ @@@@@@@@@@ @@@@ @@@ @@@@@@@@@@@ @!@!@ @!@ @!@ @!@ @!@ @!@ @!@ @!@!@ @!@ @!@ @!@!@! !@! !@! !@! !@! !@! @!@!@! !@! !@! !:! !@! !:! !:! !@! @:@ !:!!@!!: !:! !@! !:! !:! !:! !:!:!: !:! !:! !:! !:!: !:! !:! !:!:!: !:! :!: :!:!: :!: :!: :!: :!: :!: :!: :!:!: :!: ::: :::: :::::::: :::::::: :::::::::: ::: :::: ::: T.Nugent@sct.gu.edu.au tnugent@gucis.cit.gu.edu.au Griffith University Brisbane Queensland Australia Oohahh - I _like_ this font! I'll eventually make a slightly smaller version of it. (Recognise alligator2.flf? - Thanks for the idea Bob :)