summaryrefslogtreecommitdiff
path: root/textd
diff options
context:
space:
mode:
Diffstat (limited to 'textd')
-rwxr-xr-xtextd13
1 files changed, 13 insertions, 0 deletions
diff --git a/textd b/textd
new file mode 100755
index 0000000..57394a0
--- /dev/null
+++ b/textd
@@ -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