xero / figlet-fonts

my collection of figlet / toilet ascii art fonts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Script to see all fonts.

shivanshu-semwal opened this issue · comments

I made a script to see all fonts one by one, though it will helpful for others, so I'm posting here, run this script form the fonts directory.

#!/bin/bash

whattoprint="Happy New Year 2022"

readarray -d '' array < <(find . -type f \( -iname "*.flf" -o -iname "*.tlf" \) -print0)
# get length of an array
arraylength=${#array[@]}
# use for loop to read all values and indexes
for (( i=0; i<${arraylength}; i++ ));
do
  clear
  echo "$i: font name: ${array[$i]}";
  #font_name=$(echo "${array[$i]}" | cut -b 3- | rev | cut -b 5- | rev);
  figlet -d . -f "${array[$i]}" "$whattoprint"
  read  -n 1
done