MakeFontEncoding

The WooCommerce PDF & Print MakeFontEncoding function.

Description

MakeFontEncoding( $map ); 

Parameters (1)

0. $map
The map.

Usage

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

Defined (1)

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

/pdf/font/makefont/makefont.php  
  1. function MakeFontEncoding($map) 
  2. //Build differences from reference encoding 
  3. $ref=ReadMap('cp1252'); 
  4. $s=''; 
  5. $last=0; 
  6. for($i=32;$i<=255;$i++) 
  7. if($map[$i]!=$ref[$i]) 
  8. if($i!=$last+1) 
  9. $s.=$i.' '; 
  10. $last=$i; 
  11. $s.='/'.$map[$i].' '; 
  12. return rtrim($s);