76 Commits

Author SHA1 Message Date
Claudio Matsuoka
e0e63ca90a Revert JIS0201 map file
Revert JIS0201 map file to the file added by Micah Cowan in commit
6866db6fce7951cc5e82a1dc7cc5e749b08f88e1

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2012-05-29 15:42:06 -03:00
Claudio Matsuoka
66402840d6 Add uskata and jis0201 regression tests 2012-05-29 15:41:29 -03:00
Claudio Matsuoka
b5269745dd Fix banner placement in test script
Test banner was being print before setting the fonts directory, which
make it fail if FIGlet is not already installed on the system.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2012-05-29 15:23:13 -03:00
Jonathan McCrohan
7781d151a1 Properly escape minus signs in figlist.6
As found by Debian lintian checker:
hyphen-used-as-minus-sign

Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com>
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2012-05-29 14:13:45 -03:00
Claudio Matsuoka
681f931b38 Update ISO8859 map files
Jonathan McCrohan of Debian reported that FIGlet still contained non-
distributable files fonts/8859-*.flc which had the following notice:
"Unicode, Inc. specifically excludes the right to re-distribute this
file directly to third parties or other organizations whether for
profit or not".

John Cowan informed that "Those should simply be replaced by the verbatim
contents of the corresponding files at
http://www.unicode.org/Public/MAPPINGS/ISO8859 .

In addition, the jis0201.flc file should be replaced likewise by
the verbatim contents of
http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/JIS0201.TXT ."

This commit replaces files with licensing problems with those listed
by John Cowan.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2012-05-29 14:08:34 -03:00
Claudio Matsuoka
bddc3decc4 Add test to list all existing control files
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-26 00:00:47 -02:00
Claudio Matsuoka
e88224d519 Figlist changed to check for local figlet
Same change made to showfigfonts, figlist can now use the local figlet
executable instead of the system executable.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 23:56:09 -02:00
Claudio Matsuoka
eeaa125de6 Add environment variable FIGLET_FONTDIR
Environment variable FIGLET_FONTDIR can be used to set the path to search
for font files. This variable is used in the test script when FIGlet is
installed on a staging directory.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 23:44:08 -02:00
Claudio Matsuoka
e91b35b234 Add parameter to test script to specify font dir
This way we can run tests when installing in a staging dir.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 22:57:11 -02:00
Claudio Matsuoka
adcddcd38e Set font dir when checking the dist package
Make sure the binary built from the distribution package uses a local
font directory to run tests.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 21:23:36 -02:00
Claudio Matsuoka
a4e31b1efc Merge branch 'master' of github.com:cmatsuoka/figlet 2011-01-25 21:06:18 -02:00
Claudio Matsuoka
cced2251fd Update version in Makefile
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 21:00:35 -02:00
Claudio Matsuoka
6c3db7930d Prevent compatibility problems in test script
Linefeed characters are printed differently depending of the shell
used as /bin/sh. Use an extra echo to prevent output problems.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 20:56:14 -02:00
Claudio Matsuoka
0d2908b98c Don't use unitialized variable fontpath
Font path operations moved to FIGopen(), error messages changed to
use fontname.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 20:56:14 -02:00
Claudio Matsuoka
8e9b51e5c5 Change test target to check and add vercheck
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 20:56:14 -02:00
Claudio Matsuoka
46c29d49b1 Add test log and tarballs to .gitignore
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 20:56:14 -02:00
Claudio Matsuoka
cc12eefd64 Minor text updates and fixes
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 20:56:14 -02:00
Claudio Matsuoka
c326ecac38 Reduce make dist output noise
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 20:56:14 -02:00
Claudio Matsuoka
c25f7af7f2 Add version check to Makefile dist target
Show version info in serveral files including README, FAQ and manual
pages when building the distribution package, to ensure consistency.
Output is like:

Infocode: 20204
Version: 2.2.4, date: 26 January 2011
README: release 2.2.4, 26 January 2011
FAQ: The latest version of FIGlet is 2.2.4
.TH CHKFONT 6 "26 January 2011" "v2.2.4"
.TH FIGLET 6 "26 January 2011" "v2.2.4"
.TH FIGLIST 6 "26 January 2011" "v2.2.4"
.TH SHOWFIGFONTS 6 "26 January 2011" "v2.2.4"

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 20:56:14 -02:00
Claudio Matsuoka
cfc670794f Add extra regression tests
The following tests have been added:

test 017: tlf2 kerning flush-right mode
test 018: tlf2 overlap centered mode
test 019: tlf2 full-width flush-left right-to-left mode
test 020: specify font directory
test 021: paragraph mode long line output
test 022: short line output
test 023: kerning paragraph centered mode (small)

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 20:56:14 -02:00
Claudio Matsuoka
5a5d97a100 Fix kerning with UCS4 characters
Use outchr as the ouput character type (instead of char) when computing
kerning, to prevent corruption with tlf2 fonts

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 20:56:14 -02:00
Claudio Matsuoka
71409f90b4 Add regression tests to distribution package
Add test target to the Makefile, and also automatically run tests
in the dist target. Current test results:

Run tests in /home/claudio/figlet/figlet
 _____       _                     _ _
|_   _|__ __| |_   _ _ ___ ____  _| | |_ ___
  | |/ -_|_-<  _| | '_/ -_|_-< || | |  _(_-<
  |_|\___/__/\__| |_| \___/__/\_,_|_|\__/__/

Run test 001: showfigfonts output... pass
Run test 002: text rendering in all fonts... pass
Run test 003: long text rendering... pass
Run test 004: left-to-right text... pass
Run test 005: right-to-left text... pass
Run test 006: flush-left justification... pass
Run test 007: flush-right justification... pass
Run test 008: center justification... pass
Run test 009: kerning mode... pass
Run test 010: full width mode... pass
Run test 011: overlap mode... pass
Run test 012: TLF font rendering... pass
Run test 013: kerning flush-left right-to-left mode... pass
Run test 014: kerning centered right-to-left mode (slant)... pass
Run test 015: full-width flush-right right-to-left mode... pass
Run test 016: overlap flush-right mode (big)... pass

 All tests passed.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 20:56:14 -02:00
Claudio Matsuoka
f4f94eacd4 Update version number and changelog
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 20:56:14 -02:00
Wolfram Sang
934c450250 Makefile: add helpers for cross-compilation
Do not hardcode '/usr/local' but allow it to be overriden from the
outside. Also disable the second DEFAULTFONTDIR by default. While here,
remove some whitespace characters.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2011-01-25 20:54:53 -02:00
Claudio Matsuoka
258ec82455 Prevent compatibility problems in test script
Linefeed characters are printed differently depending of the shell
used as /bin/sh. Use an extra echo to prevent output problems.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 13:33:02 -02:00
Claudio Matsuoka
09a6706817 Don't use unitialized variable fontpath
Font path operations moved to FIGopen(), error messages changed to
use fontname.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 13:31:59 -02:00
Claudio Matsuoka
7fa94ad4aa Change test target to check and add vercheck
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 10:06:55 -02:00
Claudio Matsuoka
7a1e298a59 Add test log and tarballs to .gitignore
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 00:24:01 -02:00
Claudio Matsuoka
80d6cb8308 Minor text updates and fixes
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 00:22:06 -02:00
Claudio Matsuoka
7a0bfdc8b7 Reduce make dist output noise
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-24 23:15:21 -02:00
Claudio Matsuoka
767b892a5e Add version check to Makefile dist target
Show version info in serveral files including README, FAQ and manual
pages when building the distribution package, to ensure consistency.
Output is like:

Infocode: 20204
Version: 2.2.4, date: 26 January 2011
README: release 2.2.4, 26 January 2011
FAQ: The latest version of FIGlet is 2.2.4
.TH CHKFONT 6 "26 January 2011" "v2.2.4"
.TH FIGLET 6 "26 January 2011" "v2.2.4"
.TH FIGLIST 6 "26 January 2011" "v2.2.4"
.TH SHOWFIGFONTS 6 "26 January 2011" "v2.2.4"

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-24 23:10:51 -02:00
Claudio Matsuoka
58215c5648 Add extra regression tests
The following tests have been added:

test 017: tlf2 kerning flush-right mode
test 018: tlf2 overlap centered mode
test 019: tlf2 full-width flush-left right-to-left mode
test 020: specify font directory
test 021: paragraph mode long line output
test 022: short line output
test 023: kerning paragraph centered mode (small)

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-24 22:45:06 -02:00
Claudio Matsuoka
08796056ab Fix kerning with UCS4 characters
Use outchr as the ouput character type (instead of char) when computing
kerning, to prevent corruption with tlf2 fonts

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-24 22:41:36 -02:00
Claudio Matsuoka
6dc0a00468 Add regression tests to distribution package
Add test target to the Makefile, and also automatically run tests
in the dist target. Current test results:

Run tests in /home/claudio/figlet/figlet
 _____       _                     _ _
|_   _|__ __| |_   _ _ ___ ____  _| | |_ ___
  | |/ -_|_-<  _| | '_/ -_|_-< || | |  _(_-<
  |_|\___/__/\__| |_| \___/__/\_,_|_|\__/__/

Run test 001: showfigfonts output... pass
Run test 002: text rendering in all fonts... pass
Run test 003: long text rendering... pass
Run test 004: left-to-right text... pass
Run test 005: right-to-left text... pass
Run test 006: flush-left justification... pass
Run test 007: flush-right justification... pass
Run test 008: center justification... pass
Run test 009: kerning mode... pass
Run test 010: full width mode... pass
Run test 011: overlap mode... pass
Run test 012: TLF font rendering... pass
Run test 013: kerning flush-left right-to-left mode... pass
Run test 014: kerning centered right-to-left mode (slant)... pass
Run test 015: full-width flush-right right-to-left mode... pass
Run test 016: overlap flush-right mode (big)... pass

 All tests passed.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-24 19:10:23 -02:00
Claudio Matsuoka
8ce91d7e80 Update version number and changelog
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-24 17:39:09 -02:00
Claudio Matsuoka
5841eaef60 Add new tests and improve test script
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-24 17:35:26 -02:00
Claudio Matsuoka
b76d7ff3aa Add regression tests
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-23 12:43:59 -02:00
Claudio Matsuoka
bcc3cecb4f Fix rendering corruption on multiline smushing
Fix output corruption on line breaks caused by a previous attempt to
fix invalid memory accesses when smushing at the start of the line.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-23 12:13:46 -02:00
Claudio Matsuoka
8414100581 Showfigfont uses local figlet by default
Changed showfigfont to use local figlet first. This is important for
our regression tests because we want to test the local figlet and
not the previously installed one from the system directories.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-23 12:09:35 -02:00
Claudio Matsuoka
b320d67ce7 Refactor code to open font and control files
Reduce duplicate code by moving file opening code to the FIGopen()
function. This function is used to open font and control files, and
will be used to open multiple font files in ransom mode.

For code simplicity, DEFAULTFONTFILE is now defined without suffix.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-23 12:09:27 -02:00
Claudio Matsuoka
e38c680eab Document TLF font support and add infocode 5
Option -I5 lists supported file formats. If FIGlet is compiler with
TLF_FONTS defined, it will show tlf2 besides the always present flf2.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-16 19:57:19 -02:00
Claudio Matsuoka
0c53354776 Add recent history notes
Recent history notes by Claudio Matsuoka and Ian Chai from
http://www.figlet.org/figlet_history.html added to figfonts.txt

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-16 19:19:12 -02:00
Claudio Matsuoka
0d83c8c18f Add utf8 support files to file manifest
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-16 14:24:15 -02:00
Claudio Matsuoka
dc1f0f09c6 Stop UTF-8 to wchar conversion at end of string
This save us unnecessary conversions and attempts to convert
unitialized values, as reported by Valgrind.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-16 13:53:18 -02:00
Claudio Matsuoka
92caff610b Use font file name without suffix in error message
If a bad font file name is specified, display only the font name
without suffix, otherwise only the .tlf suffix is displayed (if
TLF_FONTS is defined)

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-16 13:29:55 -02:00
Claudio Matsuoka
b139ccbd5f Version string and changelog updates
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-16 12:47:50 -02:00
Claudio Matsuoka
96756a169e Fix parameters of readfontchar()
Found by inspection, the absence of function prototypes cause the compiler
to not issue a warning about this problem.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-16 11:09:44 -02:00
Claudio Matsuoka
5f7350cae5 Add support to TLF font format
The TLF font format is used by TOIlet and is very similar to the FLF
font format, the only difference being the presence of UTF-8 encoded
Unicode characters. This patch adds TLF support to FIGlet if TLF_FONTS
is defined in Makefile.

When TLF_FONTS is defined, the internal character format is changed
to UCS-4 wide characters. System requirements are support to UTF-8
multibyte encoding, a font capable of displaying Unicode glyphs and an
implementation of C99 wchar.h.

Warning: UTF-8 characters are allowed as endmarks and sub-characters, but
not as a hardblank symbol.

Example:

$ fortune | ./figlet -fpagga
░█▀█░▀█▀░█▀█░█▀▀░▀█▀░█░█░░░█▀█░█▀▀░█▀▄░█▀▀░█▀▀░█▀█░▀█▀░░░█▀█░█▀▀
░█░█░░█░░█░█░█▀▀░░█░░░█░░░░█▀▀░█▀▀░█▀▄░█░░░█▀▀░█░█░░█░░░░█░█░█▀▀
░▀░▀░▀▀▀░▀░▀░▀▀▀░░▀░░░▀░░░░▀░░░▀▀▀░▀░▀░▀▀▀░▀▀▀░▀░▀░░▀░░░░▀▀▀░▀░░
░█▀▀░█░█░█▀▀░█▀▄░█░█░▀█▀░█░█░▀█▀░█▀█░█▀▀░░░▀█▀░█▀▀░░░█▀▀░█▀▄░█▀█░█▀█░░░
░█▀▀░▀▄▀░█▀▀░█▀▄░░█░░░█░░█▀█░░█░░█░█░█░█░░░░█░░▀▀█░░░█░░░█▀▄░█▀█░█▀▀░░░
░▀▀▀░░▀░░▀▀▀░▀░▀░░▀░░░▀░░▀░▀░▀▀▀░▀░▀░▀▀▀░░░▀▀▀░▀▀▀░░░▀▀▀░▀░▀░▀░▀░▀░░░▀░
░░░░░░░░░░░░░░░▀█▀░█░█░█▀▀░█▀█░█▀▄░█▀█░█▀▄░█▀▀
░░░░░▄▄▄░▄▄▄░░░░█░░█▀█░█▀▀░█░█░█░█░█░█░█▀▄░█▀▀
░░░░░░░░░░░░░░░░▀░░▀░▀░▀▀▀░▀▀▀░▀▀░░▀▀▀░▀░▀░▀▀▀
░█▀▀░▀█▀░█░█░█▀▄░█▀▀░█▀▀░█▀█░█▀█
░▀▀█░░█░░█░█░█▀▄░█░█░█▀▀░█░█░█░█
░▀▀▀░░▀░░▀▀▀░▀░▀░▀▀▀░▀▀▀░▀▀▀░▀░▀

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-16 10:53:05 -02:00
Claudio Matsuoka
ae816570cf Add missing chkfont source to distribution package
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-13 23:51:30 -02:00
Claudio Matsuoka
b3df1e6321 Fix binary list
Otherwise figlist and showfigfonts won't be installed on make install.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-13 00:33:37 -02:00