Android examples for Graphics:Font
Font Default
//package com.java2s; import android.graphics.Paint; import android.graphics.Typeface; public class Main { public static Paint FontDefault(int size, int color, boolean shadow) { Paint textPaint = new Paint(); textPaint.setTextSize(size);/*ww w . j a v a 2 s. c om*/ textPaint.setColor(color); textPaint.setTypeface(Typeface.DEFAULT); textPaint.setTextAlign(Paint.Align.CENTER); textPaint.setAntiAlias(true); if (shadow) textPaint.setShadowLayer(2, 2, 2, color + 15); return textPaint; } }