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 LigatureSubstFormat1 extends LigatureSubst { 29 30 private int coverageOffset; 31 private int ligSetCount; 32 private int[] ligatureSetOffsets; 33 private Coverage coverage; 34 private LigatureSet[] ligatureSets; 35 36 37 protected LigatureSubstFormat1(RandomAccessFile raf,int offset) throws IOException { 38 coverageOffset = raf.readUnsignedShort(); 39 ligSetCount = raf.readUnsignedShort(); 40 ligatureSetOffsets = new int[ligSetCount]; 41 ligatureSets = new LigatureSet[ligSetCount]; 42 for (int i = 0; i < ligSetCount; i++) { 43 ligatureSetOffsets[i] = raf.readUnsignedShort(); 44 } 45 raf.seek(offset + coverageOffset); 46 coverage = Coverage.read(raf); 47 for (int i = 0; i < ligSetCount; i++) { 48 ligatureSets[i] = new LigatureSet(raf, offset + ligatureSetOffsets[i]); 49 } 50 } 51 52 public int getFormat() { 53 return 1; 54 } 55 56 } 57 | Popular Tags |