From 69b51624469f6cb594c6bdca9b7b97141a1c0a0f Mon Sep 17 00:00:00 2001 From: epoch Date: Fri, 3 Nov 2017 01:07:44 -0500 Subject: added scripts for vector font testing and part of vector font file. --- font/font.hackvr | 151 ++++++++++++++++++++++++++++++++++++++++++++++++++++ testfont.example.sh | 2 + testfont.sh | 13 +++++ 3 files changed, 166 insertions(+) create mode 100644 font/font.hackvr create mode 100755 testfont.example.sh create mode 100755 testfont.sh diff --git a/font/font.hackvr b/font/font.hackvr new file mode 100644 index 0000000..96de4ed --- /dev/null +++ b/font/font.hackvr @@ -0,0 +1,151 @@ +#A +41 addshape 2 0 0 0 0 4 0 +41 addshape 2 0 4 0 2 6 0 +41 addshape 2 2 6 0 4 4 0 +41 addshape 2 4 4 0 4 0 0 +41 addshape 2 0 2 0 4 2 0 + +#B +42 addshape 2 0 0 0 0 6 0 +42 addshape 2 0 6 0 4 4 0 +42 addshape 2 4 4 0 0 3 0 +42 addshape 2 0 3 0 4 0 0 +42 addshape 2 4 0 0 0 0 0 + +#C +43 addshape 2 4 0 0 0 1 0 +43 addshape 2 0 1 0 0 5 0 +43 addshape 2 0 5 0 4 6 0 + +#D +44 addshape 2 0 0 0 0 6 0 +44 addshape 2 0 6 0 4 5 0 +44 addshape 2 4 5 0 4 1 0 +44 addshape 2 4 1 0 0 0 0 + +#E +45 addshape 2 0 0 0 0 6 0 +45 addshape 2 0 6 0 4 6 0 +45 addshape 2 0 3 0 2 3 0 +45 addshape 2 0 0 0 4 0 0 + +#F +46 addshape 2 0 0 0 0 6 0 +46 addshape 2 0 6 0 4 6 0 +46 addshape 2 0 3 0 2 3 0 + +#G +47 addshape 2 2 3 0 4 3 0 +47 addshape 2 4 3 0 4 1 0 +47 addshape 2 4 1 0 2 0 0 +47 addshape 2 2 0 0 0 1 0 +47 addshape 2 0 1 0 0 5 0 +47 addshape 2 0 5 0 2 6 0 +47 addshape 2 2 6 0 4 5 0 + +#H +48 addshape 2 0 0 0 0 6 0 +48 addshape 2 4 0 0 4 6 0 +48 addshape 2 0 3 0 4 3 0 + +#I +49 addshape 2 0 0 0 4 0 0 +49 addshape 2 0 6 0 4 6 0 +49 addshape 2 2 0 0 2 6 0 + +#J +4a addshape 2 0 6 0 4 6 0 +4a addshape 2 2 6 0 2 0 0 +4a addshape 2 0 2 0 2 0 0 + +#K +4b addshape 2 0 0 0 0 6 0 +4b addshape 2 0 3 0 4 6 0 +4b addshape 2 0 3 0 4 0 0 + +#L +4c addshape 2 0 6 0 0 0 0 +4c addshape 2 0 0 0 4 0 0 + +#M +4d addshape 2 0 0 0 0 6 0 +4d addshape 2 0 6 0 2 4 0 +4d addshape 2 2 4 0 4 6 0 +4d addshape 2 4 6 0 4 0 0 + +#N +4e addshape 2 0 0 0 0 6 0 +4e addshape 2 0 6 0 4 0 0 +4e addshape 2 4 0 0 4 6 0 + +#O +4f addshape 2 0 1 0 0 5 0 +4f addshape 2 0 5 0 2 6 0 +4f addshape 2 2 6 0 4 5 0 +4f addshape 2 4 5 0 4 1 0 +4f addshape 2 4 1 0 2 0 0 +4f addshape 2 2 0 0 0 1 0 + +#P +50 addshape 2 0 0 0 0 6 0 +50 addshape 2 0 6 0 4 5 0 +50 addshape 2 4 5 0 4 3 0 +50 addshape 2 4 3 0 0 2 0 + +#Q +51 addshape 2 0 1 0 0 5 0 +51 addshape 2 0 5 0 2 6 0 +51 addshape 2 2 6 0 4 5 0 +51 addshape 2 4 5 0 4 1 0 +51 addshape 2 4 1 0 2 0 0 +51 addshape 2 2 0 0 0 1 0 +51 addshape 2 4 0 0 2 2 0 + +#R +52 addshape 2 0 0 0 0 6 0 +52 addshape 2 0 6 0 4 5 0 +52 addshape 2 4 5 0 4 3 0 +52 addshape 2 4 3 0 0 2 0 +52 addshape 2 0 2 0 4 0 0 + +#S +53 addshape 2 0 1 0 2 0 0 +53 addshape 2 2 0 0 4 1 0 +53 addshape 2 4 1 0 4 2 0 +53 addshape 2 4 2 0 0 4 0 +53 addshape 2 0 4 0 0 5 0 +53 addshape 2 0 5 0 2 6 0 +53 addshape 2 2 6 0 4 5 0 + +#T +54 addshape 2 0 6 0 4 6 0 +54 addshape 2 2 0 0 2 6 0 + +#U +55 addshape 2 0 6 0 0 1 0 +55 addshape 2 0 1 0 2 0 0 +55 addshape 2 2 0 0 4 1 0 +55 addshape 2 4 1 0 4 6 0 + +#V +56 addshape 2 0 6 0 2 0 0 +56 addshape 2 2 0 0 4 6 0 + +#W +57 addshape 2 0 6 0 0 0 0 +57 addshape 2 0 0 0 2 2 0 +57 addshape 2 2 2 0 4 0 0 +57 addshape 2 4 0 0 4 6 0 + +#X +58 addshape 2 0 0 0 4 6 0 +58 addshape 2 0 6 0 4 0 0 + +#Y +59 addshape 2 0 0 0 4 6 0 +59 addshape 2 0 6 0 2 3 0 + +#Z +5a addshape 2 0 6 0 4 6 0 +5a addshape 2 4 6 0 0 0 0 +5a addshape 2 0 0 0 4 0 0 diff --git a/testfont.example.sh b/testfont.example.sh new file mode 100755 index 0000000..59f2c8d --- /dev/null +++ b/testfont.example.sh @@ -0,0 +1,2 @@ +#!/bin/sh +printf "ONCE UPON A TIME\nI WASTED TIME\nOH LOOK IM STILL DOING THAT\nTHE END\n" | ./testfont.sh | ./hackvr epoch diff --git a/testfont.sh b/testfont.sh new file mode 100755 index 0000000..5abd182 --- /dev/null +++ b/testfont.sh @@ -0,0 +1,13 @@ +#!/bin/bash +xoffset=0 +yoffset=0 +while read -N 1 c;do + name="$(printf "%02x" "'$c")" + if [ "$name" = "0a" ]; then + xoffset=-6 + yoffset="$(printf '%d - %d\n' $yoffset 10 | bc)" + fi + grep "^$name " font/font.hackvr | sed 's/^'"$name"'/'"${name}_${xoffset}_${yoffset}"'/g' + printf "%s_%s_%s move %d %d 0\n" "$name" "$xoffset" "$yoffset" "$xoffset" "$yoffset" + xoffset="$(printf '%d + %d\n' $xoffset 6 | bc)" +done -- cgit v1.2.3