1 18 19 package org.apache.batik.svggen.font.table; 20 21 import java.io.IOException ; 22 import java.io.RandomAccessFile ; 23 24 29 public class TableFactory { 30 31 public static Table create(DirectoryEntry de, RandomAccessFile raf) throws IOException { 32 Table t = null; 33 switch (de.getTag()) { 34 case Table.BASE: 35 break; 36 case Table.CFF: 37 break; 38 case Table.DSIG: 39 break; 40 case Table.EBDT: 41 break; 42 case Table.EBLC: 43 break; 44 case Table.EBSC: 45 break; 46 case Table.GDEF: 47 break; 48 case Table.GPOS: 49 t = new GposTable(de, raf); 50 break; 51 case Table.GSUB: 52 t = new GsubTable(de, raf); 53 break; 54 case Table.JSTF: 55 break; 56 case Table.LTSH: 57 break; 58 case Table.MMFX: 59 break; 60 case Table.MMSD: 61 break; 62 case Table.OS_2: 63 t = new Os2Table(de, raf); 64 break; 65 case Table.PCLT: 66 break; 67 case Table.VDMX: 68 break; 69 case Table.cmap: 70 t = new CmapTable(de, raf); 71 break; 72 case Table.cvt: 73 t = new CvtTable(de, raf); 74 break; 75 case Table.fpgm: 76 t = new FpgmTable(de, raf); 77 break; 78 case Table.fvar: 79 break; 80 case Table.gasp: 81 break; 82 case Table.glyf: 83 t = new GlyfTable(de, raf); 84 break; 85 case Table.hdmx: 86 break; 87 case Table.head: 88 t = new HeadTable(de, raf); 89 break; 90 case Table.hhea: 91 t = new HheaTable(de, raf); 92 break; 93 case Table.hmtx: 94 t = new HmtxTable(de, raf); 95 break; 96 case Table.kern: 97 t = new KernTable(de, raf); 98 break; 99 case Table.loca: 100 t = new LocaTable(de, raf); 101 break; 102 case Table.maxp: 103 t = new MaxpTable(de, raf); 104 break; 105 case Table.name: 106 t = new NameTable(de, raf); 107 break; 108 case Table.prep: 109 t = new PrepTable(de, raf); 110 break; 111 case Table.post: 112 t = new PostTable(de, raf); 113 break; 114 case Table.vhea: 115 break; 116 case Table.vmtx: 117 break; 118 } 119 return t; 120 } 121 } 122 | Popular Tags |