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 LigatureSet { 29 30 private int ligatureCount; 31 private int[] ligatureOffsets; 32 private Ligature[] ligatures; 33 34 35 public LigatureSet(RandomAccessFile raf, int offset) throws IOException { 36 raf.seek(offset); 37 ligatureCount = raf.readUnsignedShort(); 38 ligatureOffsets = new int[ligatureCount]; 39 ligatures = new Ligature[ligatureCount]; 40 for (int i = 0; i < ligatureCount; i++) { 41 ligatureOffsets[i] = raf.readUnsignedShort(); 42 } 43 for (int i = 0; i < ligatureCount; i++) { 44 raf.seek(offset + ligatureOffsets[i]); 45 ligatures[i] = new Ligature(raf); 46 } 47 } 48 49 } 50 51 | Popular Tags |