ReadMap

The WooCommerce PDF & Print ReadMap function.

Description

ReadMap( $enc ); 

Parameters (1)

0. $enc
The enc.

Usage

  1. if ( !function_exists( 'ReadMap' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-pdf-print/pdf/font/makefont/makefont.php'; 
  3.  
  4. // The enc. 
  5. $enc = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = ReadMap($enc); 
  9.  

Defined (1)

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

/pdf/font/makefont/makefont.php  
  1. function ReadMap($enc) 
  2. //Read a map file 
  3. $file=dirname(__FILE__).'/'.strtolower($enc).'.map'; 
  4. $a=file($file); 
  5. if(empty($a)) 
  6. die('<b>Error:</b> encoding not found: '.$enc); 
  7. $cc2gn=array(); 
  8. foreach($a as $l) 
  9. if($l[0]=='!') 
  10. $e=preg_split('/[ \\t]+/', rtrim($l)); 
  11. $cc=hexdec(substr($e[0], 1)); 
  12. $gn=$e[2]; 
  13. $cc2gn[$cc]=$gn; 
  14. for($i=0;$i<=255;$i++) 
  15. if(!isset($cc2gn[$i])) 
  16. $cc2gn[$i]='.notdef'; 
  17. return $cc2gn;