aboutsummaryrefslogtreecommitdiff
path: root/label-tool
diff options
context:
space:
mode:
authorPřemysl Janouch <p@janouch.name>2019-04-12 23:56:11 +0200
committerPřemysl Janouch <p@janouch.name>2019-04-12 23:56:11 +0200
commitb2733bf3fd5213a1fc18de064cf5f5e5606acdfe (patch)
tree5e10de506b8724ec79a97d5ce3077a0014366033 /label-tool
parentb7826860632296cfa321e57a33439c253cad1924 (diff)
downloadsklad-b2733bf3fd5213a1fc18de064cf5f5e5606acdfe.tar.gz
sklad-b2733bf3fd5213a1fc18de064cf5f5e5606acdfe.tar.xz
sklad-b2733bf3fd5213a1fc18de064cf5f5e5606acdfe.zip
label-tool: show the font name
Diffstat (limited to 'label-tool')
-rw-r--r--label-tool/main.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/label-tool/main.go b/label-tool/main.go
index 79cac4c..35c0667 100644
--- a/label-tool/main.go
+++ b/label-tool/main.go
@@ -151,6 +151,9 @@ var tmpl = template.Must(template.New("form").Parse(`
<p>Error: {{ .PrinterErr }}
{{ end }}
</fieldset>
+ <fieldset>
+ <p>Font: {{ .Font.Name }}
+ </fieldset>
<form><fieldset>
<p><label for=text>Text:</label>
<input id=text name=text value='{{.Text}}'>
@@ -215,6 +218,7 @@ func handle(w http.ResponseWriter, r *http.Request) {
PrinterErr error
InitErr error
MediaInfo *ql.MediaInfo
+ Font *bdf.Font
Text string
Scale int
}{
@@ -222,6 +226,7 @@ func handle(w http.ResponseWriter, r *http.Request) {
PrinterErr: printerErr,
InitErr: initErr,
MediaInfo: mediaInfo,
+ Font: font,
Text: r.FormValue("text"),
}