summaryrefslogtreecommitdiff
path: root/tools/font
diff options
context:
space:
mode:
Diffstat (limited to 'tools/font')
-rw-r--r--tools/font/README.md3
-rw-r--r--tools/font/SourceCodePro-Bold.ttfbin0 -> 138268 bytes
-rw-r--r--tools/font/font.binbin0 -> 12160 bytes
-rw-r--r--tools/font/font_retina.binbin0 -> 48640 bytes
-rwxr-xr-xtools/font/makefont.sh27
5 files changed, 30 insertions, 0 deletions
diff --git a/tools/font/README.md b/tools/font/README.md
new file mode 100644
index 0000000..a16e403
--- /dev/null
+++ b/tools/font/README.md
@@ -0,0 +1,3 @@
+These fonts have been generated with
+ makefont.sh 8 16 12 SourceCodePro-Bold.ttf font.bin
+ makefont.sh 16 32 25 SourceCodePro-Bold.ttf font_retina.bin
diff --git a/tools/font/SourceCodePro-Bold.ttf b/tools/font/SourceCodePro-Bold.ttf
new file mode 100644
index 0000000..dd00982
--- /dev/null
+++ b/tools/font/SourceCodePro-Bold.ttf
Binary files differ
diff --git a/tools/font/font.bin b/tools/font/font.bin
new file mode 100644
index 0000000..17f8338
--- /dev/null
+++ b/tools/font/font.bin
Binary files differ
diff --git a/tools/font/font_retina.bin b/tools/font/font_retina.bin
new file mode 100644
index 0000000..4803b68
--- /dev/null
+++ b/tools/font/font_retina.bin
Binary files differ
diff --git a/tools/font/makefont.sh b/tools/font/makefont.sh
new file mode 100755
index 0000000..37235fa
--- /dev/null
+++ b/tools/font/makefont.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+width=$1
+height=$2
+size=$3
+fontfile=$4
+outfile=$5
+shift 5
+
+(
+for ord in $(seq 32 126); do
+ printf "\\x$(printf %x $ord)\\n"
+done
+) | convert \
+ -page ${width}x$((height*95)) \
+ -background black \
+ -fill white \
+ -antialias \
+ -font $fontfile \
+ -density 72 \
+ -gravity north \
+ -pointsize $size \
+ $* \
+ -define quantum:format=unsigned \
+ -depth 8 \
+ label:\@- \
+ -crop ${width}x$((height*95)) \
+ gray:$outfile