Open schneems opened 13 years ago
Since this issue is high in google results, and I can't find an flf spec anywhere, here's what I've surmised. Throughout this comment I use "character" to refer to ASCII bytes within the .flf file and "letter" to refer to the glyphs defined by the font.
flf2a
, providing a filetype sigil$
here seems common, but of course that won't work if you want to use $
s in your letters.-m
flag to figlet)Next you have the comments, if any, as discussed above.
Finally, the letters, following these rules:
@
, but some fonts, such as sblood, use another character.@AndrewLorente I believe http://www.jave.de/docs/figfont.txt is the spec you are looking for.
THE HEADER LINE
The header line gives information about the FIGfont. Here is an example
showing the names of all parameters:
flf2a$ 6 5 20 15 3 0 143 229 NOTE: The first five characters in
| | | | | | | | | | the entire file must be "flf2a".
/ / | | | | | | | \
Signature / / | | | | | \ Codetag_Count
Hardblank / / | | | \ Full_Layout*
Height / | | \ Print_Direction
Baseline / \ Comment_Lines
Max_Length Old_Layout*
* The two layout parameters are closely related and fairly complex.
(See "INTERPRETATION OF LAYOUT PARAMETERS".)
ah-HA! Thanks :)
A very exhaustive document explaining FIGLet / FIGDriver / FIGFonts implementation standard (from 1st version to latest v2.2):
http://www.jave.de/figlet/figfont.html
It goes into details on how FIGFonts should be parsed, kerned, smushed, ecc.
[ same as @jarv 's link above, but in HML version ]
Hey, i'm interested in writing a pure Ruby implementation of filglet for fun. Do you have any specs for the figlet font files .FLF ? If not how did you figure out how to parse them? Did you just look at another project? If so what project?