summaryrefslogtreecommitdiff
path: root/fontd
diff options
context:
space:
mode:
authorHaoran S. Diao (刁浩然) <0@hairydiode.xyz>2023-07-02 04:35:10 -0700
committerHaoran S. Diao (刁浩然) <0@hairydiode.xyz>2023-07-02 04:35:10 -0700
commitf1aa71a434bade3fc6ecb28c6816b0111d126e56 (patch)
tree4d19054a2ce78a4273ac1166a67931060dcb4435 /fontd
parentd41ea136c0380ef7f77256b292171906eabc0f07 (diff)
did some optimizations to make things a lot faster at the cost of making bbrll
only work with 1/0 inputs, and if the buffer is exactly some multiple of 2x4 large
Diffstat (limited to 'fontd')
-rwxr-xr-xfontd8
1 files changed, 4 insertions, 4 deletions
diff --git a/fontd b/fontd
index aecd636..763d9d0 100755
--- a/fontd
+++ b/fontd
@@ -18,10 +18,10 @@ bdf=$(cat $2/*bdf | awk "NR==1{fflag=0}/ENCODING $1$/{if(fflag==0){cflag=1;fflag
#convert to binary, cols depends on size
bin=$(echo $bdf | xxd -r -ps | xxd -b -c $(($size/8))|\
-#strip all the formating, replace '0' with '.' for bbrll
-sed 's/^.*://g;s/\s[^[:space:]]*$//;s/\s//g;s/0/\./g')
-
+#strip all the formating, bbrll takes 0s and 1s as input
+sed 's/^.*://g;s/\s[^[:space:]]*$//;s/\s//g')
#saving it as a var removed newlines, must add in with sed, send to bbrll to
# display
-echo LOAD_RAW $bin END_RAW PRINT_BRAILLE | sed 's/\s/\n/g' | bbrll
+#echo LOAD_RAW $bin END_RAW PRINT_BRAILLE | sed 's/\s/\n/g' | bbrll
+echo LOAD_RAW $bin END_RAW PRINT_RAW | sed 's/\s/\n/g' | bbrll