get Font Type Face from Asset - Android App

Android examples for App:Assets

Description

get Font Type Face from Asset

Demo Code


import android.content.res.AssetManager;
import android.graphics.Typeface;

public class Main {
  private static final String FONT_PATH_CODE = "fonts/code.otf";

  public static Typeface getCodeFontTypeFace(AssetManager manager) {
    Typeface typeFace = Typeface.createFromAsset(manager, FONT_PATH_CODE);
    return typeFace;
  }//  w w  w .jav  a 2  s .  co  m
}

Related Tutorials