public static String hintingSize(Font font){
  int instrSize=0;
  LocaTable locaTable=FontUtils.getLocaTable(font);
  GlyphTable glyfTable=FontUtils.getGlyphTable(font);
  for (int i=0; i < locaTable.numGlyphs(); i++) {
    Glyph glyph=glyfTable.glyph(locaTable.glyphOffset(i),locaTable.glyphLength(i));
    instrSize+=glyph.instructionSize();
  }
  double percentage=instrSize * 100.0 / glyfTable.headerLength();
  return String.format("%d bytes (%s%% of glyf table)",instrSize,twoDecimalPlaces.format(percentage));
}

public static String hintingSize ( Font font ) { int instrSize = 0 ; LocaTable locaTable = FontUtils . getLocaTable ( font ) ; GlyphTable glyfTable = FontUtils . getGlyphTable ( font ) ; for ( int i = 0 ; i < locaTable . numGlyphs ( ) ; i ++ ) { Glyph glyph = glyfTable . glyph ( locaTable . glyphOffset ( i ) , locaTable . glyphLength ( i ) ) ; instrSize += glyph . instructionSize ( ) ; } double percentage = instrSize * 100.0 / glyfTable . headerLength ( ) ; return String . format ( "%d bytes (%s%% of glyf table)" , instrSize , twoDecimalPlaces . format ( percentage ) ) ; }
gets the size of hinting instructions in the glyph table , both in bytes and as a fraction of the glyph table size .
