Commit 422ba482 authored by Andrey's avatar Andrey

printlnMixedKanji merged to println

parent 4909332d
......@@ -58,7 +58,7 @@ void main() {
printer.printBarcode(Barcode.upcA(barData));
// Print mixed (chinese + latin) text. Only for printers supporting Kanji mode
// printer.printlnMixedKanji(
// printer.println(
// 'hello ! 中文字 # world @ éphémère &',
// styles: PosStyles(codeTable: PosCodeTable.westEur),
// );
......
......@@ -149,20 +149,24 @@ class Printer {
String text, {
PosStyles styles = const PosStyles(),
int linesAfter = 0,
bool kanjiOff = true,
bool containsChinese = false,
}) {
_print(
text,
styles: styles,
kanjiOff: kanjiOff,
);
_socket.writeln();
emptyLines(linesAfter);
reset();
if (!containsChinese) {
_print(
text,
styles: styles,
kanjiOff: !containsChinese,
);
_socket.writeln();
emptyLines(linesAfter);
reset();
} else {
_printlnMixedKanji(text, styles: styles, linesAfter: linesAfter);
}
}
/// Prints one line of styled mixed (chinese and latin symbols) text
void printlnMixedKanji(
void _printlnMixedKanji(
String text, {
PosStyles styles = const PosStyles(),
int linesAfter = 0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment