示例#1
0
 /**
  * Sets the font options.
  *
  * The $font array may have the following entries:
  * 'type' = 'ttf' (TrueType) or omitted for default<br>
  * If 'type' = 'ttf' then the following can be specified<br>
  * 'size' = size in pixels<br>
  * 'angle' = the angle with which to write the text
  * 'file' = the .ttf file (either the basename, filename or full path)
  *
  * @param array $font The font options.
  */
 function setFont($fontOptions)
 {
     parent::setFont($fontOptions);
     if (!isset($this->_font['size'])) {
         $this->_font['size'] = 10;
     }
 }
示例#2
0
 /**
  * Sets the font options.
  *
  * The $font array may have the following entries:
  *
  * 'ttf' = the .ttf file (either the basename, filename or full path)
  * If 'ttf' is specified, then the following can be specified
  *
  * 'size' = size in pixels
  *
  * 'angle' = the angle with which to write the text
  *
  * @param array $font The font options.
  */
 function setFont($fontOptions)
 {
     parent::setFont($fontOptions);
     if (!isset($this->_font['size'])) {
         $this->_font['size'] = 12;
     }
     if (!isset($this->_font['encoding'])) {
         $this->_font['encoding'] = 'winansi';
     }
     if (!isset($this->_font['color'])) {
         $this->_font['color'] = 'black';
     }
 }
示例#3
0
 /**
  * Sets the font options.
  *
  * The $font array may have the following entries:
  *
  * 'ttf' = the .ttf file (either the basename, filename or full path)
  * If 'ttf' is specified, then the following can be specified
  *
  * 'size' = size in pixels
  *
  * 'angle' = the angle with which to write the text
  *
  * @param array $font The font options.
  */
 function setFont($fontOptions)
 {
     parent::setFont($fontOptions);
     if (!isset($this->_font['size'])) {
         $this->_font['size'] = 12;
     }
     if (!isset($this->_font['encoding'])) {
         $this->_font['encoding'] = null;
     }
     if ($this->_font['name'] == 'Helvetica') {
         $this->_font['embed'] = 0;
     }
     if (!isset($this->_font['color'])) {
         $this->_font['color'] = 'black';
     }
 }