Added quad support

This commit is contained in:
Manuel F Martinez 2014-05-20 22:43:40 -07:00
parent 34f562d64a
commit 8a3850ea64
2 changed files with 3 additions and 3 deletions

View File

@ -21,6 +21,7 @@ PAPER_PART_CUT = '\x1d\x56\x01' # Partial cut paper
TXT_NORMAL = '\x1b\x21\x00' # Normal text
TXT_2HEIGHT = '\x1b\x21\x10' # Double height text
TXT_2WIDTH = '\x1b\x21\x20' # Double width text
TXT_4SQUARE = '\x1b\x21\x30' # Quad area text
TXT_UNDERL_OFF = '\x1b\x2d\x00' # Underline font OFF
TXT_UNDERL_ON = '\x1b\x2d\x01' # Underline font 1-dot ON
TXT_UNDERL2_ON = '\x1b\x2d\x02' # Underline font 2-dot ON

View File

@ -234,8 +234,8 @@ class Escpos:
""" Set text properties """
# Width
if height == 2 and width == 2:
self._raw(TXT_2WIDTH)
self._raw(TXT_2HEIGHT)
self._raw(TXT_NORMAL)
self._raw(TXT_4SQUARE)
elif height == 2 and width != 2:
self._raw(TXT_NORMAL)
self._raw(TXT_2HEIGHT)
@ -254,7 +254,6 @@ class Escpos:
elif type.upper() == "U2":
self._raw(TXT_BOLD_OFF)
self._raw(TXT_UNDERL2_ON)
self._raw(TXT_ITALIC_OFF)
elif type.upper() == "BU":
self._raw(TXT_BOLD_ON)
self._raw(TXT_UNDERL_ON)