Merge pull request #13017 from andreubisquerra/develop

Add bold tags to Receipt Printers module
This commit is contained in:
Laurent Destailleur 2020-02-05 12:40:07 +01:00 committed by GitHub
commit 8051e916c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View File

@ -30,7 +30,8 @@
* <dol_use_font_a> Use font A of printer * <dol_use_font_a> Use font A of printer
* <dol_use_font_b> Use font B of printer * <dol_use_font_b> Use font B of printer
* <dol_use_font_c> Use font C of printer * <dol_use_font_c> Use font C of printer
* <dol_bold> </dol_bold> Text Bold * <dol_bold> Text Bold
* <dol_bold_disabled> Disable Text Bold
* <dol_double_height> </dol_double_height> Text double height * <dol_double_height> </dol_double_height> Text double height
* <dol_double_width> </dol_double_width> Text double width * <dol_double_width> </dol_double_width> Text double width
* <dol_underline> </dol_underline> Underline text * <dol_underline> </dol_underline> Underline text
@ -162,7 +163,7 @@ class dolReceiptPrinter extends Printer
'dol_use_font_b', 'dol_use_font_b',
'dol_use_font_c', 'dol_use_font_c',
'dol_bold', 'dol_bold',
'/dol_bold', 'dol_bold_disabled',
'dol_double_height', 'dol_double_height',
'/dol_double_height', '/dol_double_height',
'dol_double_width', 'dol_double_width',
@ -711,6 +712,12 @@ class dolReceiptPrinter extends Printer
break; break;
case 'DOL_USE_FONT_C': case 'DOL_USE_FONT_C':
$this->printer->setFont(Printer::FONT_C); $this->printer->setFont(Printer::FONT_C);
break;
case 'DOL_BOLD':
$this->printer->setEmphasis(true);
break;
case 'DOL_BOLD_DISABLED':
$this->printer->setEmphasis(false);
break; break;
default: default:
$this->printer->text($vals[$tplline]['tag']); $this->printer->text($vals[$tplline]['tag']);

View File

@ -45,3 +45,5 @@ DOL_ACTIVATE_BUZZER=Activate buzzer
DOL_PRINT_QRCODE=Print QR Code DOL_PRINT_QRCODE=Print QR Code
DOL_PRINT_LOGO=Print logo of my company DOL_PRINT_LOGO=Print logo of my company
DOL_PRINT_LOGO_OLD=Print logo of my company (old printers) DOL_PRINT_LOGO_OLD=Print logo of my company (old printers)
DOL_BOLD=Bold
DOL_BOLD_DISABLED=Disable bold