Logo Search packages:      
Sourcecode: acidbase version File versions  Download package

Cpdf::o_fontDescriptor ( id,
action,
options = '' 
)

a font descriptor, needed for including additional fonts

Definition at line 559 of file class.pdf.php.

References $options.

Referenced by selectFont().

                                                  {
  if ($action!='new'){
    $o =& $this->objects[$id];
  }
  switch ($action){
    case 'new':
      $this->objects[$id]=array('t'=>'fontDescriptor','info'=>$options);
      break;
    case 'out':
      $res="\n".$id." 0 obj\n<< /Type /FontDescriptor\n";
      foreach ($o['info'] as $label => $value){
        switch ($label){
          case 'Ascent':
          case 'CapHeight':
          case 'Descent':
          case 'Flags':
          case 'ItalicAngle':
          case 'StemV':
          case 'AvgWidth':
          case 'Leading':
          case 'MaxWidth':
          case 'MissingWidth':
          case 'StemH':
          case 'XHeight':
          case 'CharSet':
            if (strlen($value)){
              $res.='/'.$label.' '.$value."\n";
            }
            break;
          case 'FontFile':
          case 'FontFile2':
          case 'FontFile3':
            $res.='/'.$label.' '.$value." 0 R\n";
            break;
          case 'FontBBox':
            $res.='/'.$label.' ['.$value[0].' '.$value[1].' '.$value[2].' '.$value[3]."]\n";
            break;
          case 'FontName':
            $res.='/'.$label.' /'.$value."\n";
            break;
        }
      }
      $res.=">>\nendobj";
      return $res;
      break;
  }
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index