windsor-bot 0.2.9 → 0.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/printing/escp.js +4 -5
- package/package.json +1 -1
package/dist/printing/escp.js
CHANGED
|
@@ -24,11 +24,10 @@ function wrapText(text, width) {
|
|
|
24
24
|
return lines.length > 0 ? lines : [''];
|
|
25
25
|
}
|
|
26
26
|
function chooseFontForLines(totalLines) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return { fontSize: 'tall', cols: COLS_DOUBLE };
|
|
27
|
+
// Keep short messages large without relying on the printer's
|
|
28
|
+
// double-width glyph capacity, which varies by model and font.
|
|
29
|
+
if (totalLines <= 8) {
|
|
30
|
+
return { fontSize: 'tall', cols: COLS_NORMAL };
|
|
32
31
|
}
|
|
33
32
|
else {
|
|
34
33
|
return { fontSize: 'normal', cols: COLS_NORMAL };
|