Font_Glyph_Outline

`glyf` font table.

Defined (1)

The class is defined in the following location(s).

/lib/dompdf/lib/php-font-lib/classes/Font_Glyph_Outline.php  
  1. class Font_Glyph_Outline extends Font_Binary_Stream { 
  2. /** 
  3. * @var Font_Table_glyf 
  4. */ 
  5. protected $table; 
  6.  
  7. protected $offset; 
  8. protected $size; 
  9.  
  10. // Data 
  11. public $numberOfContours; 
  12. public $xMin; 
  13. public $yMin; 
  14. public $xMax; 
  15. public $yMax; 
  16.  
  17. public $raw; 
  18.  
  19. /** 
  20. * @param Font_Table_glyf $table 
  21. * @param $offset 
  22. * @param $size 
  23. * @return Font_Glyph_Outline 
  24. */ 
  25. static function init(Font_Table_glyf $table, $offset, $size) { 
  26. $font = $table->getFont(); 
  27. $font->seek($offset); 
  28.  
  29. if ($font->readInt16() > -1) { 
  30. /** @var Font_Glyph_Outline_Simple $glyph */ 
  31. $glyph = new Font_Glyph_Outline_Simple($table, $offset, $size); 
  32. else { 
  33. /** @var Font_Glyph_Outline_Composite $glyph */ 
  34. $glyph = new Font_Glyph_Outline_Composite($table, $offset, $size); 
  35.  
  36. $glyph->parse(); 
  37. return $glyph; 
  38.  
  39. /** 
  40. * @return Font_TrueType 
  41. */ 
  42. function getFont() { 
  43. return $this->table->getFont(); 
  44.  
  45. function __construct(Font_Table_glyf $table, $offset = null, $size = null) { 
  46. $this->table = $table; 
  47. $this->offset = $offset; 
  48. $this->size = $size; 
  49.  
  50. function parse() { 
  51. $font = $this->getFont(); 
  52. $font->seek($this->offset); 
  53.  
  54. if (!$this->size) { 
  55. return; 
  56.  
  57. $this->raw = $font->read($this->size); 
  58.  
  59. function parseData() { 
  60. $font = $this->getFont(); 
  61. $font->seek($this->offset); 
  62.  
  63. $this->numberOfContours = $font->readInt16(); 
  64. $this->xMin = $font->readFWord(); 
  65. $this->yMin = $font->readFWord(); 
  66. $this->xMax = $font->readFWord(); 
  67. $this->yMax = $font->readFWord(); 
  68.  
  69. function encode() { 
  70. $font = $this->getFont(); 
  71. return $font->write($this->raw, strlen($this->raw)); 
  72.  
  73. function getSVGContours() { 
  74. // Inherit 
  75.  
  76. function getGlyphIDs() { 
  77. return array();