Beispiel #1
0
  public final Typeface getTypeFaceFromAsset(String assetName) {
    try {
      return Typeface.createFromAsset(this.getResources().getAssets(), assetName);
    } catch (Throwable e) {
    }

    return null;
  }
Beispiel #2
0
  public final Typeface getTypeFaceFromByteArray(byte[] data) {
    try {
      File f = getDataCacheFile(data);

      if (f != null) return Typeface.createFromFile(f);
    } catch (Exception e) {
      Log.e("JUCE", e.toString());
    }

    return null;
  }