Android examples for Graphics:Font
set View Text Font
//package com.java2s; import android.graphics.Typeface; import android.view.View; import android.widget.TextView; public class Main { public static void setTextFont(View view, String fontName) { if (null == view || !(view instanceof TextView)) { return; }// www. j a v a 2 s . co m Typeface typeface = Typeface.createFromAsset(view.getContext() .getResources().getAssets(), fontName); if (null == typeface) { return; } ((TextView) view).setTypeface(typeface); } }