feat(ascii-art): 17 hand-coded font tables (5 existing + 12 new) with snapshot tests

Widen height bound to 3-12 so the spec-named figlet fonts fit:
- Isometric1, Isometric2, Isometric3, Isometric4 (h=11)
- Calvin S (h=3)

Previously these were substituted with height-compliant alternatives
(Small Isometric1, Banner3-D, Henry 3D, Small Poison, Modular). Restoring
the spec-named fonts preserves the product intent: 4 distinct isometric
projections and the calvin-and-hobbes-style Calvin S font.

Amit Haridas
This commit is contained in:
2026-09-14 20:30:04 +05:30
parent 5385e159ed
commit f71aa2b097
3 changed files with 1825 additions and 1417 deletions
+1618 -1220
View File
File diff suppressed because it is too large Load Diff
@@ -49,13 +49,9 @@ exports[`AsciiArt.fonts HELLO snapshot per font bubble 1`] = `
`; `;
exports[`AsciiArt.fonts HELLO snapshot per font calvin-s 1`] = ` exports[`AsciiArt.fonts HELLO snapshot per font calvin-s 1`] = `
" __ __ _______ ___ ___ _______ "╦ ╦ ╔═╗ ╦ ╦ ╔═╗
| | | || || | | | | | ╠═╣ ║╣ ║ ║ ║ ║
| |_| || ___|| | | | | _ | ╩ ╩ ╚═╝ ╩═╝ ╩═╝ ╚═╝ "
| || |___ | | | | | | | |
| || ___|| |___ | |___ | |_| |
| _ || |___ | || || |
|__| |__||_______||_______||_______||_______|"
`; `;
exports[`AsciiArt.fonts HELLO snapshot per font digital 1`] = ` exports[`AsciiArt.fonts HELLO snapshot per font digital 1`] = `
@@ -71,43 +67,57 @@ exports[`AsciiArt.fonts HELLO snapshot per font digital 1`] = `
exports[`AsciiArt.fonts HELLO snapshot per font isometric1 1`] = ` exports[`AsciiArt.fonts HELLO snapshot per font isometric1 1`] = `
" ___ ___ ___ ___ ___ " ___ ___ ___ ___ ___
/\\__\\ /\\ \\ /\\__\\ /\\__\\ /\\ \\ /\\__\\ /\\ \\ /\\__\\ /\\__\\ /\\ \\
/:/__/_ /::\\ \\ /:/ / /:/ / /::\\ \\ /:/ / /::\\ \\ /:/ / /:/ / /::\\ \\
/::\\/\\__\\ /::\\:\\__\\ /:/__/ /:/__/ /:/\\:\\__\\ /:/__/ /:/\\:\\ \\ /:/ / /:/ / /:/\\:\\ \\
\\/\\::/ / \\:\\:\\/ / \\:\\ \\ \\:\\ \\ \\:\\/:/ / /::\\ \\ ___ /::\\~\\:\\ \\ /:/ / /:/ / /:/ \\:\\ \\
/:/ / \\:\\/ / \\:\\__\\ \\:\\__\\ \\::/ / /:/\\:\\ /\\__\\ /:/\\:\\ \\:\\__\\ /:/__/ /:/__/ /:/__/ \\:\\__\\
\\/__\\:\\/:/ / \\:\\~\\:\\ \\/__/ \\:\\ \\ \\:\\ \\ \\:\\ \\ /:/ /
\\::/ / \\:\\ \\:\\__\\ \\:\\ \\ \\:\\ \\ \\:\\ /:/ /
/:/ / \\:\\ \\/__/ \\:\\ \\ \\:\\ \\ \\:\\/:/ /
/:/ / \\:\\__\\ \\:\\__\\ \\:\\__\\ \\::/ /
\\/__/ \\/__/ \\/__/ \\/__/ \\/__/ " \\/__/ \\/__/ \\/__/ \\/__/ \\/__/ "
`; `;
exports[`AsciiArt.fonts HELLO snapshot per font isometric2 1`] = ` exports[`AsciiArt.fonts HELLO snapshot per font isometric2 1`] = `
"'##::::'##:'########:'##:::::::'##::::::::'#######:: " ___ ___ ___
##:::: ##: ##.....:: ##::::::: ##:::::::'##.... ##: /\\ \\ /\\__\\ /\\ \\
##:::: ##: ##::::::: ##::::::: ##::::::: ##:::: ##: \\:\\ \\ /:/ _/_ /::\\ \\
#########: ######::: ##::::::: ##::::::: ##:::: ##: \\:\\ \\ /:/ /\\__\\ /:/\\:\\ \\
##.... ##: ##...:::: ##::::::: ##::::::: ##:::: ##: ___ /::\\ \\ /:/ /:/ _/_ ___ ___ ___ ___ /:/ \\:\\ \\
##:::: ##: ##::::::: ##::::::: ##::::::: ##:::: ##: /\\ /:/\\:\\__\\ /:/_/:/ /\\__\\ /\\ \\ /\\__\\ /\\ \\ /\\__\\ /:/__/ \\:\\__\\
##:::: ##: ########: ########: ########:. #######:: \\:\\/:/ \\/__/ \\:\\/:/ /:/ / \\:\\ \\ /:/ / \\:\\ \\ /:/ / \\:\\ \\ /:/ /
..:::::..::........::........::........:::.......:::" \\::/__/ \\::/_/:/ / \\:\\ /:/ / \\:\\ /:/ / \\:\\ /:/ /
\\:\\ \\ \\:\\/:/ / \\:\\/:/ / \\:\\/:/ / \\:\\/:/ /
\\:\\__\\ \\::/ / \\::/ / \\::/ / \\::/ /
\\/__/ \\/__/ \\/__/ \\/__/ \\/__/ "
`; `;
exports[`AsciiArt.fonts HELLO snapshot per font isometric3 1`] = ` exports[`AsciiArt.fonts HELLO snapshot per font isometric3 1`] = `
" _ _ ____ _ _ ____ " ___ ___ ___
FJ L] F ___J FJ FJ F __ ] /__/\\ / /\\ / /\\
J |__| L J |___: J | J | J |--| L \\ \\:\\ / /:/_ / /::\\
| __ | | _____| | | | | | | | | \\__\\:\\ / /:/ /\\ ___ ___ ___ ___ / /:/\\:\\
F L__J J F L____: F L_____ F L_____ F L__J J ___ / /::\\ / /:/ /:/_ /__/\\ / /\\ /__/\\ / /\\ / /:/ \\:\\
J__L J__L J________L J________L J________L J\\______/F /__/\\ /:/\\:\\ /__/:/ /:/ /\\ \\ \\:\\ / /:/ \\ \\:\\ / /:/ /__/:/ \\__\\:\\
|__L J__| |________| |________| |________| J______F \\ \\:\\/:/__\\/ \\ \\:\\/:/ /:/ \\ \\:\\ /:/ \\ \\:\\ /:/ \\ \\:\\ / /:/
" \\ \\::/ \\ \\::/ /:/ \\ \\:\\/:/ \\ \\:\\/:/ \\ \\:\\ /:/
\\ \\:\\ \\ \\:\\/:/ \\ \\::/ \\ \\::/ \\ \\:\\/:/
\\ \\:\\ \\ \\::/ \\__\\/ \\__\\/ \\ \\::/
\\__\\/ \\__\\/ \\__\\/ "
`; `;
exports[`AsciiArt.fonts HELLO snapshot per font isometric4 1`] = ` exports[`AsciiArt.fonts HELLO snapshot per font isometric4 1`] = `
" " ___ ___ ___ ___ ___
@@@ @@@ @@@@@@@@ @@@ @@@ @@@@@@ / /\\ / /\\ / /\\ / /\\ / /\\
@@! @@@ @@! @@! @@! @@! @@@ / /:/ / /::\\ / /:/ / /:/ / /::\\
@!@!@!@! @!!!:! @!! @!! @!@ !@! / /:/ / /:/\\:\\ / /:/ / /:/ / /:/\\:\\
!!: !!! !!: !!: !!: !!: !!! / /::\\ ___ / /::\\ \\:\\ / /:/ / /:/ / /:/ \\:\\
: : : : :: :: : ::.: : : ::.: : : :. : /__/:/\\:\\ /\\ /__/:/\\:\\ \\:\\ /__/:/ /__/:/ /__/:/ \\__\\:\\
" \\__\\/ \\:\\/:/ \\ \\:\\ \\:\\_\\/ \\ \\:\\ \\ \\:\\ \\ \\:\\ / /:/
\\__\\::/ \\ \\:\\ \\:\\ \\ \\:\\ \\ \\:\\ \\ \\:\\ /:/
/ /:/ \\ \\:\\_\\/ \\ \\:\\ \\ \\:\\ \\ \\:\\/:/
/__/:/ \\ \\:\\ \\ \\:\\ \\ \\:\\ \\ \\::/
\\__\\/ \\__\\/ \\__\\/ \\__\\/ \\__\\/ "
`; `;
exports[`AsciiArt.fonts HELLO snapshot per font lean 1`] = ` exports[`AsciiArt.fonts HELLO snapshot per font lean 1`] = `
+2 -2
View File
@@ -37,8 +37,8 @@ describe('AsciiArt.fonts table shape', () => {
const font = AsciiArtFonts.HAND_CODED_FONTS[id]; const font = AsciiArtFonts.HAND_CODED_FONTS[id];
expect(font).toBeDefined(); expect(font).toBeDefined();
expect(typeof font.height).toBe('number'); expect(typeof font.height).toBe('number');
expect(font.height).toBeGreaterThanOrEqual(4); expect(font.height).toBeGreaterThanOrEqual(3);
expect(font.height).toBeLessThanOrEqual(8); expect(font.height).toBeLessThanOrEqual(12);
expect(typeof font.chars).toBe('object'); expect(typeof font.chars).toBe('object');
for (const ch of 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 '.split('')) { for (const ch of 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 '.split('')) {
expect(font.chars[ch]).toBeDefined(); expect(font.chars[ch]).toBeDefined();