Example usage for android.graphics Typeface createFromAsset

List of usage examples for android.graphics Typeface createFromAsset

Introduction

In this page you can find the example usage for android.graphics Typeface createFromAsset.

Prototype

public static Typeface createFromAsset(AssetManager mgr, String path) 

Source Link

Document

Create a new typeface from the specified font data.

Usage

From source file:Main.java

public static Typeface getFont(Activity ac) {
    return Typeface.createFromAsset(ac.getAssets(), "DS-DIGI.TTF");
}

From source file:Main.java

public static Typeface normalFont(Context ctx) {
    return Typeface.createFromAsset(ctx.getAssets(), "ParmaPetit-Normal.ttf");
}

From source file:Main.java

public static Typeface outlineFont(Context ctx) {
    return Typeface.createFromAsset(ctx.getAssets(), "ParmaPetitOutline.ttf");
}

From source file:Main.java

public static Typeface getRobotoLight(Context context) {
    return Typeface.createFromAsset(context.getAssets(), "fonts/robotolight.ttf");
}

From source file:Main.java

public static Typeface obtainTypeface(Context context) {
    return Typeface.createFromAsset(context.getAssets(), "fonts/noto-light.otf");
}

From source file:Main.java

public static Typeface getRobotoLight(Context context) {
    return Typeface.createFromAsset(context.getAssets(), "robotolight.ttf");
}

From source file:Main.java

public static void setFont(TextView textView) {
    Typeface tf = Typeface.createFromAsset(textView.getContext().getAssets(), "font/ProximaNova-Reg.otf");
    textView.setTypeface(tf);/*from  ww  w  . j a  v a 2 s.c om*/
}

From source file:Main.java

public static Typeface getTypefaceShelf(Context context) {
    return Typeface.createFromAsset(context.getAssets(), "fonts/see_you_at_the_movies.ttf");
}

From source file:Main.java

public static Typeface getLatoLightFont(Context context) {
    return Typeface.createFromAsset(context.getAssets(), "lato_light.ttf");
}

From source file:Main.java

public static Typeface getTypeface(Context context, String fontName) {
    return Typeface.createFromAsset(context.getAssets(), fontName);
}