Compartilhar via


FontsContract.BuildTypeface Method

Definition

Build a Typeface from an array of FontInfo

        Results that are marked as not ready will be skipped.
[Android.Runtime.Register("buildTypeface", "(Landroid/content/Context;Landroid/os/CancellationSignal;[Landroid/provider/FontsContract$FontInfo;)Landroid/graphics/Typeface;", "", ApiSince=26)]
public static Android.Graphics.Typeface? BuildTypeface (Android.Content.Context context, Android.OS.CancellationSignal? cancellationSignal, Android.Provider.FontsContract.FontInfo[] fonts);
[<Android.Runtime.Register("buildTypeface", "(Landroid/content/Context;Landroid/os/CancellationSignal;[Landroid/provider/FontsContract$FontInfo;)Landroid/graphics/Typeface;", "", ApiSince=26)>]
static member BuildTypeface : Android.Content.Context * Android.OS.CancellationSignal * Android.Provider.FontsContract.FontInfo[] -> Android.Graphics.Typeface

Parameters

context
Context

A Context that will be used to fetch the font contents.

cancellationSignal
CancellationSignal

A signal to cancel the operation in progress, or null if none. If the operation is canceled, then android.os.OperationCanceledException will be thrown.

fonts
FontsContract.FontInfo[]

An array of FontInfo to be used to create a Typeface.

Returns

A Typeface object. Returns null if typeface creation fails.

Attributes

Remarks

Java documentation for android.provider.FontsContract.buildTypeface(android.content.Context, android.os.CancellationSignal, android.provider.FontInfo[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to