Browse Source

minor settings changes to print_label

Davide Alberani 9 years ago
parent
commit
41c4178c2a
2 changed files with 4 additions and 3 deletions
  1. 1 1
      README.md
  2. 3 2
      data/triggers-available/print_label.py

+ 1 - 1
README.md

@@ -55,7 +55,7 @@ If you store SSL key and certificate in the *ssl* directory (default names: even
 Authentication
 ==============
 
-By default, authentication is required; default username and password are *admin* and *eventman*.
+By default, authentication is required; default username and password are *admin* and *eventman*. If you want to completely disable authentication, run the daemon with --authentication=off
 
 
 License and copyright

+ 3 - 2
data/triggers-available/print_label.py

@@ -19,6 +19,7 @@ LABEL_WIDTH = 13488
 LABEL_HEIGHT = 3744
 
 FONT_TEXT = 'Ubuntu-C.ttf'
+#FONT_TEXT = 'CONCIBB_.TTF'
 FONT_TEXT_ENCODING = 'latin-1'
 FONT_BARCODE = 'free3of9.ttf'
 
@@ -34,8 +35,8 @@ def build_label(w, h, barcode_text, line1, line2, font_text=FONT_TEXT, font_barc
     barcode_text = "*" + barcode_text + "*"
     line1 = unicode(line1, 'utf-8').encode(FONT_TEXT_ENCODING, 'ignore')
     line2 = unicode(line2, 'utf-8').encode(FONT_TEXT_ENCODING, 'ignore')
-    fontbar = ImageFont.truetype(_get_resource(font_barcode), 2200)
-    fontnorm = ImageFont.truetype(_get_resource(font_text), 780)
+    fontbar = ImageFont.truetype(_get_resource(font_barcode), 2000)
+    fontnorm = ImageFont.truetype(_get_resource(font_text), 840)
     image = Image.new('RGB', (w, h), (255, 255, 255))
     draw = ImageDraw.Draw(image)
     wbar, hbar = draw.textsize(barcode_text, font=fontbar)