Exemple #1
0
  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());
 }