public static FontProgram createFont(byte[] ttc,int ttcIndex,boolean cached) throws java.io.IOException {
  String fontKey=null;
  if (cached) {
    fontKey=Integer.toString(ArrayUtil.hashCode(ttc)) + Integer.toString(ttcIndex);
    FontProgram fontFound=FontCache.getFont(fontKey);
    if (fontFound != null) {
      return fontFound;
    }
  }
  FontProgram fontBuilt=new TrueTypeFont(ttc,ttcIndex);
  return cached ? FontCache.saveFont(fontBuilt,fontKey) : fontBuilt;
}

public static FontProgram createFont ( byte [ ] ttc , int ttcIndex , boolean cached ) throws java . io . IOException { String fontKey = null ; if ( cached ) { fontKey = Integer . toString ( ArrayUtil . hashCode ( ttc ) ) + Integer . toString ( ttcIndex ) ; FontProgram fontFound = FontCache . getFont ( fontKey ) ; if ( fontFound != null ) { return fontFound ; } } FontProgram fontBuilt = new TrueTypeFont ( ttc , ttcIndex ) ; return cached ? FontCache . saveFont ( fontBuilt , fontKey ) : fontBuilt ; }
creates a new truetype font program from ttc ( truetype collection ) file bytes .
