Added quad support
This commit is contained in:
parent
34f562d64a
commit
8a3850ea64
|
@ -21,6 +21,7 @@ PAPER_PART_CUT = '\x1d\x56\x01' # Partial cut paper
|
||||||
TXT_NORMAL = '\x1b\x21\x00' # Normal text
|
TXT_NORMAL = '\x1b\x21\x00' # Normal text
|
||||||
TXT_2HEIGHT = '\x1b\x21\x10' # Double height text
|
TXT_2HEIGHT = '\x1b\x21\x10' # Double height text
|
||||||
TXT_2WIDTH = '\x1b\x21\x20' # Double width 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_OFF = '\x1b\x2d\x00' # Underline font OFF
|
||||||
TXT_UNDERL_ON = '\x1b\x2d\x01' # Underline font 1-dot ON
|
TXT_UNDERL_ON = '\x1b\x2d\x01' # Underline font 1-dot ON
|
||||||
TXT_UNDERL2_ON = '\x1b\x2d\x02' # Underline font 2-dot ON
|
TXT_UNDERL2_ON = '\x1b\x2d\x02' # Underline font 2-dot ON
|
||||||
|
|
|
@ -234,8 +234,8 @@ class Escpos:
|
||||||
""" Set text properties """
|
""" Set text properties """
|
||||||
# Width
|
# Width
|
||||||
if height == 2 and width == 2:
|
if height == 2 and width == 2:
|
||||||
self._raw(TXT_2WIDTH)
|
self._raw(TXT_NORMAL)
|
||||||
self._raw(TXT_2HEIGHT)
|
self._raw(TXT_4SQUARE)
|
||||||
elif height == 2 and width != 2:
|
elif height == 2 and width != 2:
|
||||||
self._raw(TXT_NORMAL)
|
self._raw(TXT_NORMAL)
|
||||||
self._raw(TXT_2HEIGHT)
|
self._raw(TXT_2HEIGHT)
|
||||||
|
@ -254,7 +254,6 @@ class Escpos:
|
||||||
elif type.upper() == "U2":
|
elif type.upper() == "U2":
|
||||||
self._raw(TXT_BOLD_OFF)
|
self._raw(TXT_BOLD_OFF)
|
||||||
self._raw(TXT_UNDERL2_ON)
|
self._raw(TXT_UNDERL2_ON)
|
||||||
self._raw(TXT_ITALIC_OFF)
|
|
||||||
elif type.upper() == "BU":
|
elif type.upper() == "BU":
|
||||||
self._raw(TXT_BOLD_ON)
|
self._raw(TXT_BOLD_ON)
|
||||||
self._raw(TXT_UNDERL_ON)
|
self._raw(TXT_UNDERL_ON)
|
||||||
|
|
Loading…
Reference in New Issue