minor settings changes to print_label
This commit is contained in:
parent
1279f0d961
commit
41c4178c2a
2 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue