setFont() public method

Select font. Most printers have two fonts (Fonts A and B), and some have a third (Font C).
public setFont ( integer $font = Printer::FONT_A )
$font integer The font to use. Must be either Printer::FONT_A, Printer::FONT_B, or Printer::FONT_C.
Beispiel #1
1
    $printer->text("The quick brown fox jumps over the lazy dog\n");
}
$printer->setEmphasis(false);
// Reset
$printer->cut();
/* Double-strike (looks basically the same as emphasis) */
for ($i = 0; $i < 2; $i++) {
    $printer->setDoubleStrike($i == 1);
    $printer->text("The quick brown fox jumps over the lazy dog\n");
}
$printer->setDoubleStrike(false);
$printer->cut();
/* Fonts (many printers do not have a 'Font C') */
$fonts = array(Printer::FONT_A, Printer::FONT_B, Printer::FONT_C);
for ($i = 0; $i < count($fonts); $i++) {
    $printer->setFont($fonts[$i]);
    $printer->text("The quick brown fox jumps over the lazy dog\n");
}
$printer->setFont();
// Reset
$printer->cut();
/* Justification */
$justification = array(Printer::JUSTIFY_LEFT, Printer::JUSTIFY_CENTER, Printer::JUSTIFY_RIGHT);
for ($i = 0; $i < count($justification); $i++) {
    $printer->setJustification($justification[$i]);
    $printer->text("A man a plan a canal panama\n");
}
$printer->setJustification();
// Reset
$printer->cut();
/* Barcodes - see barcode.php for more detail */