text method
Implementation
List<int> text(
String text, {
PosStyles styles = const PosStyles(),
int linesAfter = 0,
bool containsChinese = false,
int? maxCharsPerLine,
}) {
List<int> bytes = [];
if (!containsChinese) {
bytes += _text(
_encode(text, isKanji: containsChinese),
styles: styles,
isKanji: containsChinese,
maxCharsPerLine: maxCharsPerLine,
);
// Ensure at least one line break after the text
bytes += emptyLines(linesAfter + 1);
} else {
bytes += _mixedKanji(text, styles: styles, linesAfter: linesAfter);
}
return bytes;
}