-
Notifications
You must be signed in to change notification settings - Fork 881
Closed
Description
Activity
Stenerson commented on Jul 8, 2017on Jul 8, 2017
Collaborator
More actions
Have you tried setTextSize(1, 2) or setTextSize(2, 1)? I find that the double height OR double width alone is some times enough.
Cynically commented on Jul 8, 2017on Jul 8, 2017
Author
More actions
I have tried. Double height of way too tall to list all of the items. The perfect would really be half point.
mike42
mike42 commented on Jul 16, 2017on Jul 16, 2017
Owner
More actions
Unfortunately, nothing like this is possible in native ESC/POS. The best you could do is render system fonts as small pictures, and print those instead.
There is one trick that I'll suggest though: you can double FONT B instead, which is slightly smaller (Exact specs depend on your printer, check the manual)
require __DIR__ . '/../autoload.php';
use Mike42\Escpos\Printer;
use Mike42\Escpos\PrintConnectors\FilePrintConnector;
$connector = new FilePrintConnector("php://stdout");
$printer = new Printer($connector);
/* Initialize */
$printer -> initialize();
title($printer, "Font A sizes\n");
$printer -> setFont(Printer::FONT_A);
$printer -> setTextSize(1, 1);
$printer -> text("The quick brown fox jumps over the lazy dog.\n");
$printer -> setTextSize(2, 2);
$printer -> text("The quick brown fox jumps over the lazy dog.\n");
title($printer, "Font B sizes\n");
$printer -> setFont(Printer::FONT_B);
$printer -> setTextSize(1, 1);
$printer -> text("The quick brown fox jumps over the lazy dog.\n");
$printer -> setTextSize(2, 2);
$printer -> text("The quick brown fox jumps over the lazy dog.\n");
$printer -> cut();
$printer -> close();
function title(Printer $printer, $text)
{
$printer -> selectPrintMode(Printer::MODE_EMPHASIZED);
$printer -> text("\n" . $text);
$printer -> selectPrintMode(); // Reset
}As printed on an Epson TM-T20:
I find the default font size on a Epson TM-T88V a little bit small for older people to read but if I set the font size to 2x then it is a way too big. What would be the best way to have a size inbetween?