1 18 package org.apache.batik.svggen.font.table; 19 20 import java.io.IOException ; 21 import java.io.RandomAccessFile ; 22 23 28 public abstract class SingleSubst extends LookupSubtable { 29 30 public abstract int getFormat(); 31 32 public abstract int substitute(int glyphId); 33 34 public static SingleSubst read(RandomAccessFile raf, int offset) throws IOException { 35 SingleSubst s = null; 36 raf.seek(offset); 37 int format = raf.readUnsignedShort(); 38 if (format == 1) { 39 s = new SingleSubstFormat1(raf, offset); 40 } else if (format == 2) { 41 s = new SingleSubstFormat2(raf, offset); 42 } 43 return s; 44 } 45 46 } 47 48 | Popular Tags |