1 18 package org.apache.batik.svggen.font.table; 19 20 import java.io.IOException ; 21 import java.io.RandomAccessFile ; 22 23 28 public class KernSubtableFormat0 extends KernSubtable { 29 30 private int nPairs; 31 private int searchRange; 32 private int entrySelector; 33 private int rangeShift; 34 private KerningPair[] kerningPairs; 35 36 37 protected KernSubtableFormat0(RandomAccessFile raf) throws IOException { 38 nPairs = raf.readUnsignedShort(); 39 searchRange = raf.readUnsignedShort(); 40 entrySelector = raf.readUnsignedShort(); 41 rangeShift = raf.readUnsignedShort(); 42 kerningPairs = new KerningPair[nPairs]; 43 for (int i = 0; i < nPairs; i++) { 44 kerningPairs[i] = new KerningPair(raf); 45 } 46 } 47 48 public int getKerningPairCount() { 49 return nPairs; 50 } 51 52 public KerningPair getKerningPair(int i) { 53 return kerningPairs[i]; 54 } 55 56 } 57 | Popular Tags |