Subject: | some TOIlet fonts displayed with a column of '@' at ther right border |
With Text-FIGlet-2.18 on Ubuntu Hardy x86_64.
perl: This is perl, v5.10.0 built for x86_64-linux-gnu-thread-multi
Some TOIlet fonts(especially the *mono(9|12) fonts), have an extra
whitespace after the line ending '@' character, which are displayed by
Text::FIGlet. Example using smmono12 font:
@ @ @ @ @ @ @ @
▗▄▖ @ ▗▄▖ @ @ ▗▄ @ ▗▄▖ @ @ ▄▄▖ @ ▄▄▖ @
█▀█ @ █▀█ @ @ ▟█ @ █▀▜ @ @ ▐▀▀█▖@ ▐▀▀█▖@
▐▌ ▐▌@ ▐▌ ▐▌@ ▄ @ ▐▘█ @ ▐▌▄▖ @ ▄ @ ▟▌@ ▟▌@
▐▌█▐▌@ ▐▌█▐▌@ █ @ ▗▛ █ @ ▐█▀█▖@ █ @ ▐██ @ ▐██ @
▐▌ ▐▌@ ▐▌ ▐▌@ @ ▐███▌@ ▐▌ ▐▌@ @ ▜▌@ ▜▌@
█▄█ @ █▄█ @ █ @ █ @ ▝█▄█▘@ █ @ ▐▄▄█▘@ ▐▄▄█▘@
▝▀▘ @ ▝▀▘ @ ▀ @ ▀ @ ▝▀▘ @ ▀ @ ▀▀▘ @ ▀▀▘ @
@ @ @ @ @ @ @ @
Attached patch strips superfluous whitespaces from these fonts, to
prevent this.
Subject: | figlet-Font.pm.diff |
diff -Naur --exclude countdown.pl Text-FIGlet-2.18/lib/Text/FIGlet/Font.pm Text-FIGlet-2.18-my/lib/Text/FIGlet/Font.pm
--- Text-FIGlet-2.18/lib/Text/FIGlet/Font.pm 2009-10-10 09:34:10.000000000 +0200
+++ Text-FIGlet-2.18-my/lib/Text/FIGlet/Font.pm 2010-04-13 15:24:17.000000000 +0200
@@ -203,6 +203,7 @@
$self->{_maxLen} = $length if $i < 126 && $self->{_maxLen} < $length;
#Ideally this would be /o but then all figchar's must have same EOL
+ $font->[$i] =~ s/\@ $//mg;
$font->[$i] =~ s/\015|\Q$end\E{1,2}\r?$//mg;
$font->[$i] = [$length,#maxLen
$wLead, #wLead