Example #1
0
 /**
  * Verifies that the font file actually contains TrueType outlines.
  *
  * @throws \ZendPdf\Exception\ExceptionInterface
  */
 public function screen()
 {
     if ($this->_isScreened) {
         return;
     }
     parent::screen();
     switch ($this->_readScalerType()) {
         case 0x10000:
             // version 1.0 - Windows TrueType signature
             break;
         case 0x74727565:
             // 'true' - Macintosh TrueType signature
             break;
         default:
             throw new Exception\UnrecognizedFontException('Not a TrueType font file');
     }
     $this->fontType = Pdf\Font::TYPE_TRUETYPE;
     $this->_isScreened = true;
 }