diff options
author | Haoran S. Diao (刁浩然) <0@hairydiode.xyz> | 2023-06-30 02:55:40 -0700 |
---|---|---|
committer | Haoran S. Diao (刁浩然) <0@hairydiode.xyz> | 2023-06-30 02:55:40 -0700 |
commit | ec1d430daf529802729aa1ab622ad1a2d7c53cd3 (patch) | |
tree | 2c07d7ccc87530527ef3254fef45880000b3bbe5 /textd | |
parent | ac9b480f8d95a5bcb50dfe0dc2cf914b23572e1e (diff) |
Added ability to display entire strings of text
Diffstat (limited to 'textd')
-rwxr-xr-x | textd | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -0,0 +1,13 @@ +#!/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 utf8 -t utf32be | xxd -u -p -c 4) +#convert to decimal +dec=$(echo -n "ibase=16;$codes" | bc) +dec=($dec) +for decimal_code in "${dec[@]}"; do + ./fontd "$decimal_code" "$1" +done |