Xprinter Xpn160ii Driver (2024)

def set_font_size(self, width=1, height=1): """width, height: 1-8""" w = max(0, min(7, width - 1)) h = max(0, min(7, height - 1)) self._write(b'\x1D\x21' + bytes([(w << 4) | h]))