Skip to content

Commit

Permalink
[UPD] Removendo BUG linha 144 classe Daruma
Browse files Browse the repository at this point in the history
  • Loading branch information
robmachado committed Jun 5, 2016
1 parent 4fda51f commit a5a842d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/Connectors/Buffer.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ final class Buffer implements ConnectorInterface
' [DC2] ' => 18, //DC2 Cancela modo condensado
' [DC3] ' => 19, //DC3 Cancela modo enfatizado
' [DC4] ' => 20, //DC4 Controle de dispositivo 4 Inicia modo normal
' [NAK] ' => 21, // NAK
' [SYN] ' => 22, //Sincronismo
' [CAN] ' => 24, //CAN Cancela linha enviada
' [EM] ' => 25, //Avança 4 linhas
Expand Down
12 changes: 4 additions & 8 deletions src/Printers/Daruma.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,10 @@ public function setFont($font = null)
$font = $this->defaultFont($font);
$fn = array_keys($this->aFont, $font, true);
$mode = $fn[0];
$b = ($this->boldMode) ? 1 : 0;
$d = ($this->doubleHeight) ? 1 : 0;
$e = ($this->expandedMode) ? 1 : 0;
$u = ($this->underlineMode) ? 1 : 0;
$mode += ((2**3) * $b);
$mode += ((2**4) * $d);
$mode += ((2**5) * $e);
$mode += ((2**7) * $u);
$mode += (8 * $this->boldMode);
$mode += (16 * $this->doubleHeight);
$mode += (32 * $this->expandedMode);
$mode += (128 * $this->underlineMode);
$this->buffer->write(self::ESC.'!'.chr($mode));
}

Expand Down

0 comments on commit a5a842d

Please sign in to comment.