1 31 package org.pdfbox.ttf; 32 33 import java.io.IOException ; 34 35 41 public class CMAPTable extends TTFTable 42 { 43 46 public static final String TAG = "cmap"; 47 48 51 public static final int PLATFORM_WINDOWS = 3; 52 53 56 public static final int ENCODING_SYMBOL = 0; 57 60 public static final int ENCODING_UNICODE = 1; 61 64 public static final int ENCODING_SHIFT_JIS = 2; 65 68 public static final int ENCODING_BIG5 = 3; 69 72 public static final int ENCODING_PRC = 4; 73 76 public static final int ENCODING_WANSUNG = 5; 77 80 public static final int ENCODING_JOHAB = 6; 81 82 private CMAPEncodingEntry[] cmaps; 83 84 91 public void initData( TrueTypeFont ttf, TTFDataStream data ) throws IOException 92 { 93 int version = data.readUnsignedShort(); 94 int numberOfTables = data.readUnsignedShort(); 95 cmaps = new CMAPEncodingEntry[ numberOfTables ]; 96 for( int i=0; i< numberOfTables; i++ ) 97 { 98 CMAPEncodingEntry cmap = new CMAPEncodingEntry(); 99 cmap.initData( ttf, data ); 100 cmaps[i]=cmap; 101 } 102 for( int i=0; i< numberOfTables; i++ ) 103 { 104 cmaps[i].initSubtable( ttf, data ); 105 } 106 107 } 108 111 public CMAPEncodingEntry[] getCmaps() 112 { 113 return cmaps; 114 } 115 118 public void setCmaps(CMAPEncodingEntry[] cmapsValue) 119 { 120 this.cmaps = cmapsValue; 121 } 122 } 123 | Popular Tags |