|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.graphics.Typeface
public class Typeface
The Typeface class specifies the typeface and intrinsic style of a font. This is used in the paint, along with optionally Paint settings like textSize, textSkewX, textScaleX to specify how text appears when drawn (and measured).
| Field Summary | |
|---|---|
static int |
BOLD
|
static int |
BOLD_ITALIC
|
static Typeface |
DEFAULT
The default NORMAL typeface object |
static Typeface |
DEFAULT_BOLD
The default BOLD typeface object. |
static int |
ITALIC
|
static Typeface |
MONOSPACE
The NORMAL style of the default monospace typeface. |
(package private) int |
native_instance
|
static int |
NORMAL
|
static Typeface |
SANS_SERIF
The NORMAL style of the default sans serif typeface. |
static Typeface |
SERIF
The NORMAL style of the default serif typeface. |
| Method Summary | |
|---|---|
static Typeface |
create(String familyName,
int style)
Create a typeface object given a family name, and option style information. |
static Typeface |
create(Typeface family,
int style)
Create a typeface object that best matches the specified existing typeface and the specified Style. |
static Typeface |
createFromAsset(AssetManager mgr,
String path)
Create a new typeface from the specified font data. |
static Typeface |
defaultFromStyle(int style)
Returns one of the default typeface objects, based on the specified style |
protected void |
finalize()
Called by the virtual machine when there are no longer any (non-weak) references to the receiver. |
int |
getStyle()
Returns the typeface's intrinsic style attributes |
boolean |
isBold()
Returns true if getStyle() has the BOLD bit set. |
boolean |
isItalic()
Returns true if getStyle() has the ITALIC bit set. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Typeface DEFAULT
public static final Typeface DEFAULT_BOLD
public static final Typeface SANS_SERIF
public static final Typeface SERIF
public static final Typeface MONOSPACE
int native_instance
public static final int NORMAL
public static final int BOLD
public static final int ITALIC
public static final int BOLD_ITALIC
| Method Detail |
|---|
public int getStyle()
public final boolean isBold()
public final boolean isItalic()
public static Typeface create(String familyName,
int style)
familyName - May be null. The name of the font family.style - The style (normal, bold, italic) of the typeface.
e.g. NORMAL, BOLD, ITALIC, BOLD_ITALIC
public static Typeface create(Typeface family,
int style)
family - May be null. The name of the existing type face.style - The style (normal, bold, italic) of the typeface.
e.g. NORMAL, BOLD, ITALIC, BOLD_ITALIC
public static Typeface defaultFromStyle(int style)
public static Typeface createFromAsset(AssetManager mgr,
String path)
mgr - The application's asset managerpath - The file name of the font data in the assets directory
protected void finalize()
throws Throwable
ObjectNote: The virtual machine assumes that the implementation in class Object is empty.
finalize in class ObjectThrowable - The virtual machine ignores any exceptions which are
thrown during finalization.
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||