summaryrefslogtreecommitdiff
path: root/textd
blob: 4ac31d53b91e2bf3169596c29362854862dc4d72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash
#usage:
#	textd DIR
#		reads from stdin, and displays all text vertically using fonts
#		in DIR
#	assumes unicode utf-8 input
codes=$(iconv -f UTF-8 -t UTF-32BE | xxd -u -p -c 4)
#convert to decimal, must replace ' ' with ';' first
dec=$(echo -n "ibase=16;$codes"  | bc 2>/dev/null)
#converts space/newline delimited string to array
dec=($dec)
for decimal_code in "${dec[@]}"; do
	 fontd "$decimal_code" "$1"
done