From 41c4178c2a87f5d994a188dddba87759cd83892c Mon Sep 17 00:00:00 2001 From: Davide Alberani Date: Sun, 3 May 2015 14:31:47 +0200 Subject: [PATCH] minor settings changes to print_label --- README.md | 2 +- data/triggers-available/print_label.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 412b140..1e7dede 100644 --- a/README.md +++ b/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 diff --git a/data/triggers-available/print_label.py b/data/triggers-available/print_label.py index b407f5a..d4b2856 100755 --- a/data/triggers-available/print_label.py +++ b/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)