Original Usenet thread from rec.arts.ascii, started 12 Aug 1994.
Talk: Figlet fonts
rec.arts.ascii
· 3 messages · 12 Aug 1994 - 12 Aug 1994
In article <32dlbr$gp...@gagme.wwa.com>, m...@dfv.rwth-aachen.de (Martin Junius) writes: > The .flf's from the author's posting were MSDOS text files with CR/LF > end of lines, resulting in the additional `@'. To use them on a UNIX > system, the CRs must be stripped. > > Martin So what should I do when I make future Figlet fonts? Use the CR/LFs and say that it is specifically a DOS Figlet font, or convert it to just LFs and post both... seems like a lot of work just to please unix-types. Is there any way to get them to work on both without converting them? -Den -- ..%%%%%%...%%%%%%....%%%%%...%%%%%%...%%%%%%.. ..%%.......%%.......%%.........%%.....%%...... a94...@mindlink.bc.ca ..%%%%.....%%%%......%%%%......%%.....%%%%.... ..%%.......%%...........%%.....%%.....%%...... Just a simple clown. ..%%.......%%%%%%...%%%%%......%%.....%%%%%%..
Den...@mindlink.bc.ca (Dennis Monbourquette) writes: > So what should I do when I make future Figlet fonts? Use the CR/LFs and > say that it is specifically a DOS Figlet font, or convert it to just LFs > and post both... seems like a lot of work just to please unix-types. Is > there any way to get them to work on both without converting them? > -Den I think that figlet compiled on MSDOS should be quite happy with LF only. (At least compiled with a proper C library?) And I'm sure there are a lot of "unix-types" out here! ;-) Martin -- _____ _____ | |___ | Martin Junius FIDO: 2:2452/110.1 | | | | | | Communication Networks Internet: m...@dfv.rwth-aachen.de |_|_|_|@work| Aachen U of Technology Phone: ++49-241-8790220 (voice)
Dennis Monbourquette: > So what should I do when I make future Figlet fonts? Use the CR/LFs and >say that it is specifically a DOS Figlet font, or convert it to just LFs >and post both... seems like a lot of work just to please unix-types. Is >there any way to get them to work on both without converting them? Yup. Fix figlet to ignore '\r'. here's a quick patch that makes it ignore any trailing whitespace in the flf file. *** 1.1 1994/08/12 13:11:46 --- figlet.c 1994/08/12 13:20:37 *************** *** 481,492 **** if (fgets(inputline,charwidthlimit,fontfile)==NULL) { inputline[0]='\0'; } ! k=strlen(inputline)-1; ! endchar=k<0?'\0':(k==0||inputline[k]!='\n')?inputline[k]:inputline[k-1]; ! for(;k>=0?(inputline[k]=='\n' || inputline[k]==endchar):0;k--) { ! inputline[k]='\0'; } ! charlist[i]=(char*)my_alloc(sizeof(char)*(strlen(inputline)+1)); strcpy(charlist[i],inputline); } fclose(fontfile); --- 481,500 ---- if (fgets(inputline,charwidthlimit,fontfile)==NULL) { inputline[0]='\0'; } ! k = strlen(inputline) - 1; ! /* skip over trailing spaces. */ ! while (0 <= k && isspace(inputline[k])) { ! --k; ! } ! /* skip over trailing delimiters. */ ! if (0 <= k) { ! endchar = inputline[k]; ! while (0 <= k && inputline[k] == endchar) { ! --k; } ! } ! inputline[k + 1] = '\0'; ! charlist[i] = (char*) my_alloc(sizeof(char) * (k + 1)); strcpy(charlist[i],inputline); } fclose(fontfile);
Related ASCII art in the Gallery
Explore these categories from our collection of 11,000+ artworks:
Make your own ASCII art
Turn images, text or 3D into ASCII, or draw your own – right in your browser.
About this thread.
These messages were posted publicly to the newsgroup
rec.arts.ascii
in 1994 and are mirrored here unchanged as part of the Historic Archives – only email addresses are masked.
The artwork and text belong to their original authors: if you copy a piece, keep the artist's initials or signature intact and credit them where you can.
Are you one of the authors? Contact us to get your posts attributed, connected to your artist profile, or removed.
Report this message
Help us keep the archive clean and accurate. Reports are reviewed by a person – nothing is changed automatically.