You are here

function BARCODE::setFont in Barcode 6

File

./barcode.inc.php, line 63

Class

BARCODE

Code

function setFont($font, $autolocate = false) {
  $this->_font = $font;
  if ($autolocate) {
    $this->_font = dirname($_SERVER["PATH_TRANSLATED"]) . "/" . $font . ".ttf";
    if (isset($_SERVER['WINDIR']) && file_exists($_SERVER['WINDIR'])) {
      $this->_font = $_SERVER['WINDIR'] . "\\Fonts\\" . $font . ".ttf";
    }
  }
}