Ejemplo n.º 1
0
 public function __construct($name, $size)
 {
     parent::__construct($name, $size);
     if ($this->getExtension() === NULL) {
         $this->setExtension('ttf');
     }
 }
Ejemplo n.º 2
0
 public function __construct($name, $size)
 {
     parent::__construct($name, $size);
     $this->extension = 'fdb';
 }
Ejemplo n.º 3
0
 private function getGDAverageWidth(awFileFont $font)
 {
     $text = "azertyuiopqsdfghjklmmmmmmmwxcvbbbn,;:!?.";
     $box = imagettfbbox($font->size, 0, $font->font . '.' . $font->getExtension(), $text);
     if ($box === FALSE) {
         awImage::drawError("Class FileFontDriver: Unable to get font average width.");
     }
     list(, , $x2, $y2, , , $x1, $y1) = $box;
     return abs($x2 - $x1) / strlen($text);
 }
Ejemplo n.º 4
0
 function awTTFFont($name, $size)
 {
     parent::awFileFont($name, $size);
     if ($this->getExtension() === NULL) {
         $this->setExtension('ttf');
     }
 }