msx-font/countchars.sh

9 lines
166 B
Bash
Executable File

#!/bin/bash
gm identify -format "%W %H" "$1" | while read width height
do
cols=$((width / 8))
rows=$((height / 8))
seq -f "$2" 0 $((cols*rows - 1))
done