FileDocCategorySizeDatePackage
FontTable.javaAPI DocApache Poi 3.0.11938Mon Jan 01 18:55:22 GMT 2007org.apache.poi.hdf.model.hdftypes

FontTable

public class FontTable extends Object implements HDFType
Comment me
author
Ryan Ackley

Fields Summary
String[]
fontNames
Constructors Summary
public FontTable(byte[] fontTable)

    int size = LittleEndian.getShort(fontTable, 0);
    fontNames = new String[size];

    int currentIndex = 4;
    for(int x = 0; x < size; x++)
    {
      byte ffnLength = fontTable[currentIndex];

      int nameOffset = currentIndex + 40;
      StringBuffer nameBuf = new StringBuffer();
      //char ch = Utils.getUnicodeCharacter(fontTable, nameOffset);
      char ch = (char)LittleEndian.getShort(fontTable, nameOffset);
      while(ch != '\0")
      {
        nameBuf.append(ch);
        nameOffset += 2;
        ch = (char)LittleEndian.getShort(fontTable, nameOffset);
      }
      fontNames[x] = nameBuf.toString();
      currentIndex += ffnLength + 1;
    }

  
Methods Summary
public java.lang.StringgetFont(int index)

    return fontNames[index];