Browse Source

label-tool: show the font name

master
Přemysl Janouch 9 months ago
parent
commit
b2733bf3fd
Signed by: Přemysl Janouch <p@janouch.name> GPG Key ID: A0420B94F92B9493
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      label-tool/main.go

+ 5
- 0
label-tool/main.go View File

@@ -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"),
}


Loading…
Cancel
Save