apply Roman Font - Android Graphics

Android examples for Graphics:Font

Description

apply Roman Font

Demo Code


//package com.java2s;
import android.content.Context;
import android.graphics.Typeface;

public class Main {
    private static Typeface customFont;
    public static final String TYPEFACE_AVENIR_ROMAN = "fonts/AvenirLTStd-Roman.otf";

    public static Typeface applyAvenirRoman(Context context) {
        customFont = Typeface.createFromAsset(context.getAssets(),
                TYPEFACE_AVENIR_ROMAN);/* w w  w  .j av  a  2 s  . c o m*/
        return customFont;
    }
}

Related Tutorials