setGlobalCodeTable method

List<int> setGlobalCodeTable(
  1. String? codeTable
)

Set global code table which will be used instead of the default printer's code table (even after resetting)

Implementation

List<int> setGlobalCodeTable(String? codeTable) {
  List<int> bytes = [];
  _codeTable = codeTable;
  if (codeTable != null) {
    bytes += Uint8List.fromList(
      List.from(cCodeTable.codeUnits)..add(_profile.getCodePageId(codeTable)),
    );
    _styles = _styles.copyWith(codeTable: codeTable);
  }
  return bytes;
}