posSetFontSize static method
选择字体大小(倍高倍宽) @param size1 @param size2 @return
Implementation
static Uint8List? posSetFontSize(int size1, int size2) {
if (size1 < 0 || size1 > 7 || size2 < 0 || size2 > 7) return null;
final intToWidth =
Uint8List.fromList([0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70]);
final intToHeight =
Uint8List.fromList([0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07]);
final dataSize = (intToWidth[size1] + intToHeight[size2]);
Command.gsExclamationMark[2] = dataSize;
return Uint8List.fromList(Command.gsExclamationMark);
}