google code revision ef4c58851474 (Added quad-area characters)
This commit is contained in:
parent
417476030e
commit
fa8d961e6d
|
@ -20,6 +20,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
|
||||||
|
|
|
@ -214,17 +214,17 @@ class Escpos:
|
||||||
def set(self, align='left', font='a', type='normal', width=1, height=1):
|
def set(self, align='left', font='a', type='normal', width=1, height=1):
|
||||||
""" Set text properties """
|
""" Set text properties """
|
||||||
# Width
|
# Width
|
||||||
if width == 2 and height != 2:
|
if height != 2 and width != 2: # DEFAULT SIZE: NORMAL
|
||||||
self._raw(TXT_NORMAL)
|
|
||||||
self._raw(TXT_2WIDTH)
|
|
||||||
elif height == 2 and width != 2:
|
|
||||||
self._raw(TXT_NORMAL)
|
self._raw(TXT_NORMAL)
|
||||||
|
|
||||||
|
if height == 2:
|
||||||
self._raw(TXT_2HEIGHT)
|
self._raw(TXT_2HEIGHT)
|
||||||
elif height == 2 and width == 2:
|
if width == 2:
|
||||||
self._raw(TXT_2WIDTH)
|
self._raw(TXT_2WIDTH)
|
||||||
self._raw(TXT_2HEIGHT)
|
|
||||||
else: # DEFAULT SIZE: NORMAL
|
if height == 2 and width == 2:
|
||||||
self._raw(TXT_NORMAL)
|
self._raw(TXT_4SQUARE)
|
||||||
|
|
||||||
# Type
|
# Type
|
||||||
if type.upper() == "B":
|
if type.upper() == "B":
|
||||||
self._raw(TXT_BOLD_ON)
|
self._raw(TXT_BOLD_ON)
|
||||||
|
|
Loading…
Reference in New Issue