Android Guides | Samples

Android.Graphics.Typeface Class

The Typeface class specifies the typeface and intrinsic style of a font.

See Also: Typeface

Syntax

[Android.Runtime.Register("android/graphics/Typeface", DoNotGenerateAcw=true)]
public class Typeface : Object

Remarks

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).

[Android Documentation]

Requirements

Namespace: Android.Graphics
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Android.Graphics.Typeface are listed below.

See Also: Object

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Properties

[read-only]
static
DefaultTypeface. The default NORMAL typeface object
[read-only]
static
DefaultBoldTypeface. The default BOLD typeface object.
[read-only]
IsBoldBoolean. Returns true if getStyle() has the BOLD bit set.
[read-only]
IsItalicBoolean. Returns true if getStyle() has the ITALIC bit set.
[read-only]
static
MonospaceTypeface. The NORMAL style of the default monospace typeface.
[read-only]
static
SansSerifTypeface. The NORMAL style of the default sans serif typeface.
[read-only]
static
SerifTypeface. The NORMAL style of the default serif typeface.
[read-only]
StyleTypefaceStyle. Returns the typeface's intrinsic style attributes

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

static
Create(Typeface, TypefaceStyle) : Typeface
Create a typeface object that best matches the specified existing typeface and the specified Style.
static
Create(String, TypefaceStyle) : Typeface
Create a typeface object given a family name, and option style information.
static
CreateFromAsset(AssetManager, String) : Typeface
Create a new typeface from the specified font data.
static
CreateFromFile(File) : Typeface
Create a new typeface from the specified font file.
static
CreateFromFile(String) : Typeface
Create a new typeface from the specified font file.
static
DefaultFromStyle(TypefaceStyle) : Typeface
Returns one of the default typeface objects, based on the specified style