From f1aa71a434bade3fc6ecb28c6816b0111d126e56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Haoran=20S=2E=20Diao=20=28=E5=88=81=E6=B5=A9=E7=84=B6=29?= <0@hairydiode.xyz> Date: Sun, 2 Jul 2023 04:35:10 -0700 Subject: 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 --- fontd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'fontd') 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 -- cgit v1.1