Java tutorial
//package com.java2s; /** * Appcelerator Titanium Mobile * Copyright (c) 2009-2012 by Appcelerator, Inc. All Rights Reserved. * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. */ import android.content.Context; import android.graphics.Typeface; import android.widget.TextView; public class Main { public static String getDefaultFontWeight(Context context) { String style = "normal"; TextView tv = new TextView(context); if (tv != null) { Typeface tf = tv.getTypeface(); if (tf != null && tf.isBold()) { style = "bold"; } } return style; } }