From 154f3147e3bb6acc1170316fb8c83d1476bbdf3f Mon Sep 17 00:00:00 2001 From: Přemysl Janouch
Date: Thu, 25 Apr 2019 20:33:51 +0200 Subject: label-tool: allow choosing from multiple fonts --- cmd/label-tool/main.go | 100 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 75 insertions(+), 25 deletions(-) (limited to 'cmd/label-tool') diff --git a/cmd/label-tool/main.go b/cmd/label-tool/main.go index 39a840c..15fb68d 100644 --- a/cmd/label-tool/main.go +++ b/cmd/label-tool/main.go @@ -4,6 +4,7 @@ import ( "errors" "html/template" "image" + "image/draw" "image/png" "log" "net/http" @@ -16,15 +17,26 @@ import ( "janouch.name/sklad/ql" ) -var font *bdf.Font +var tmplFont = template.Must(template.New("font").Parse(` + +
++ +{{ end }} + +`)) -var tmpl = template.Must(template.New("form").Parse(` +var tmplForm = template.Must(template.New("form").Parse(`
- + |