Commit 422ba482 authored by Andrey's avatar Andrey

printlnMixedKanji merged to println

parent 4909332d
...@@ -58,7 +58,7 @@ void main() { ...@@ -58,7 +58,7 @@ void main() {
printer.printBarcode(Barcode.upcA(barData)); printer.printBarcode(Barcode.upcA(barData));
// Print mixed (chinese + latin) text. Only for printers supporting Kanji mode // Print mixed (chinese + latin) text. Only for printers supporting Kanji mode
// printer.printlnMixedKanji( // printer.println(
// 'hello ! 中文字 # world @ éphémère &', // 'hello ! 中文字 # world @ éphémère &',
// styles: PosStyles(codeTable: PosCodeTable.westEur), // styles: PosStyles(codeTable: PosCodeTable.westEur),
// ); // );
......
...@@ -149,20 +149,24 @@ class Printer { ...@@ -149,20 +149,24 @@ class Printer {
String text, { String text, {
PosStyles styles = const PosStyles(), PosStyles styles = const PosStyles(),
int linesAfter = 0, int linesAfter = 0,
bool kanjiOff = true, bool containsChinese = false,
}) { }) {
_print( if (!containsChinese) {
text, _print(
styles: styles, text,
kanjiOff: kanjiOff, styles: styles,
); kanjiOff: !containsChinese,
_socket.writeln(); );
emptyLines(linesAfter); _socket.writeln();
reset(); emptyLines(linesAfter);
reset();
} else {
_printlnMixedKanji(text, styles: styles, linesAfter: linesAfter);
}
} }
/// Prints one line of styled mixed (chinese and latin symbols) text /// Prints one line of styled mixed (chinese and latin symbols) text
void printlnMixedKanji( void _printlnMixedKanji(
String text, { String text, {
PosStyles styles = const PosStyles(), PosStyles styles = const PosStyles(),
int linesAfter = 0, 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