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

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

the font encoding

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

References $options.

Referenced by o_font().

                                                {
  if ($action!='new'){
    $o =& $this->objects[$id];
  }
  switch ($action){
    case 'new':
      // the options array should contain 'differences' and maybe 'encoding'
      $this->objects[$id]=array('t'=>'fontEncoding','info'=>$options);
      break;
    case 'out':
      $res="\n".$id." 0 obj\n<< /Type /Encoding\n";
      if (!isset($o['info']['encoding'])){
        $o['info']['encoding']='WinAnsiEncoding';
      }
      if ($o['info']['encoding']!='none'){
        $res.="/BaseEncoding /".$o['info']['encoding']."\n";
      }
      $res.="/Differences \n[";
      $onum=-100;
      foreach($o['info']['differences'] as $num=>$label){
        if ($num!=$onum+1){
          // we cannot make use of consecutive numbering
          $res.= "\n".$num." /".$label;
        } else {
          $res.= " /".$label;
        }
        $onum=$num;
      }
      $res.="\n]\n>>\nendobj";
      return $res;
      break;
  }
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index