All notable changes to this project will be documented in this file. This change log follows the conventions of keepachangelog.com.
The rendering engine was rewritten to exactly match the C figlet's
addchar, smushamt, and smushem functions from figlet.c. Specific
fixes:
Row merge rewritten as direct C translation. The per-row merge now uses a mutable char array matching the C code's in-place writes + STRCAT semantics, including NUL-byte truncation for characters whose rows are shorter than the smush amount. This replaces the previous three-region string merge which diverged from C behavior for edge cases.
old_layout & 31 masking. When Full_Layout is absent, the C
figlet masks Old_Layout with 31 (bits 0-4, rules 1-5), excluding
bit 5 (rule 6, hardblank smushing). Fonts like Colossal with
Old_Layout=32 now correctly use universal smushing.
See figlet.c readfont().
previouscharwidth < 2 guard. The C figlet disables smushing
(but not fitting) when either the previous or current character is
narrower than 2 columns. See figlet.c smushem().
maxsmush = currcharwidth cap. The smush amount is now capped
at the current character's width, matching figlet.c smushamt().
linebd > 0 scan termination. The C figlet's backward scan for
the last non-space character stops at position 0 (using linebd > 0,
not >= 0). This affects the overlap calculation for all-space rows.
Blank-row amt++ is unconditional. The C figlet increments the
overlap for blank buffer rows regardless of smushing mode or character
widths. See figlet.c smushamt(): if (!ch1||ch1==' ') amt++;.
Three contributed fonts had FIGcharacters with inconsistent row widths, violating figfont.txt §BASIC DATA STRUCTURE ("there must be a consistent width for each line once the endmarks are removed"):
# (code 35): row 0 was 0 chars, others 1 char.
Padded row 0 to 1 space.> (code 62): row 0 was 3 chars, others 1 char.
Padded rows 1-8 to 3 spaces.# (code 35): row 0 was 0 chars, others
1 char. Padded row 0 to 1 space.# (code 35): row 0 was 0 chars, others
1 char. Padded row 0 to 1 space.all-fonts function returning bundled font nameswrite-font for serializing a font map to FIGfont Version 2 format,
with spec validation before writingvalidate-font and valid-font? for checking fonts against the
FIGfont spec using clojure.spec (header fields, required characters,
row structure)render now accepts a font name string, a resource path, a filesystem
path, a File, or a font map as its first argumentdoc/fonts.md)doc/users-guide.md)render-str (superseded by render accepting font name strings directly)ivrit font (right-to-left not yet supported)Initial release.
Old_Layout and Full_Layout,
including all horizontal and vertical mode/rule combinationsresources/fonts/: standard, small, big, slant,
banner, block, shadow, lean, mini, ivrit.flc) processingCan you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |