Methods Summary |
---|
private static void | apply(android.graphics.Paint paint, java.lang.String family)
int oldStyle;
Typeface old = paint.getTypeface();
if (old == null) {
oldStyle = 0;
} else {
oldStyle = old.getStyle();
}
Typeface tf = Typeface.create(family, oldStyle);
int fake = oldStyle & ~tf.getStyle();
if ((fake & Typeface.BOLD) != 0) {
paint.setFakeBoldText(true);
}
if ((fake & Typeface.ITALIC) != 0) {
paint.setTextSkewX(-0.25f);
}
paint.setTypeface(tf);
|
public int | describeContents()
return 0;
|
public java.lang.String | getFamily()Returns the font family name.
return mFamily;
|
public int | getSpanTypeId()
return TextUtils.TYPEFACE_SPAN;
|
public void | updateDrawState(android.text.TextPaint ds)
apply(ds, mFamily);
|
public void | updateMeasureState(android.text.TextPaint paint)
apply(paint, mFamily);
|
public void | writeToParcel(android.os.Parcel dest, int flags)
dest.writeString(mFamily);
|