public static SingleSubst read(RandomAccessFileEmulator raf, int offset) throws IOException { SingleSubst s = null; raf.seek(offset); int format = raf.readUnsignedShort(); if (format == 1) { s = new SingleSubstFormat1(raf, offset); } else if (format == 2) { s = new SingleSubstFormat2(raf, offset); } return s; }
protected NameTable(DirectoryEntry de, RandomAccessFileEmulator raf) throws IOException { raf.seek(de.getOffset()); formatSelector = raf.readShort(); numberOfNameRecords = raf.readShort(); stringStorageOffset = raf.readShort(); records = new NameRecord[numberOfNameRecords]; // Load the records, which contain the encoding information and string offsets for (int i = 0; i < numberOfNameRecords; i++) { records[i] = new NameRecord(raf); } // Now load the strings for (int i = 0; i < numberOfNameRecords; i++) { records[i].loadString(raf, de.getOffset() + stringStorageOffset); } }
protected HeadTable(DirectoryEntry de, RandomAccessFileEmulator raf) throws IOException { raf.seek(de.getOffset()); versionNumber = raf.readInt(); fontRevision = raf.readInt(); checkSumAdjustment = raf.readInt(); magicNumber = raf.readInt(); flags = raf.readShort(); unitsPerEm = raf.readShort(); created = raf.readLong(); modified = raf.readLong(); xMin = raf.readShort(); yMin = raf.readShort(); xMax = raf.readShort(); yMax = raf.readShort(); macStyle = raf.readShort(); lowestRecPPEM = raf.readShort(); fontDirectionHint = raf.readShort(); indexToLocFormat = raf.readShort(); glyphDataFormat = raf.readShort(); }
protected FpgmTable(DirectoryEntry de, RandomAccessFileEmulator raf) throws IOException { raf.seek(de.getOffset()); readInstructions(raf, de.getLength()); }