1 31 package org.pdfbox.encoding; 32 33 import java.util.Iterator ; 34 35 import org.fontbox.afm.CharMetric; 36 import org.fontbox.afm.FontMetric; 37 38 import org.pdfbox.cos.COSBase; 39 import org.pdfbox.cos.COSName; 40 41 47 public class AFMEncoding extends Encoding 48 { 49 private FontMetric metric = null; 50 51 56 public AFMEncoding( FontMetric fontInfo ) 57 { 58 metric = fontInfo; 59 Iterator characters = metric.getCharMetrics().iterator(); 60 while( characters.hasNext() ) 61 { 62 CharMetric nextMetric = (CharMetric)characters.next(); 63 addCharacterEncoding( nextMetric.getCharacterCode(), COSName.getPDFName( nextMetric.getName() ) ); 64 } 65 } 66 67 72 public COSBase getCOSObject() 73 { 74 return null; 75 } 76 } | Popular Tags |