fetchFonts

@NonNull
open fun fetchFonts(@NonNull context: @NonNull Context, @Nullable cancellationSignal: @Nullable CancellationSignal, @NonNull request: @NonNull FontRequest): @NonNull FontsContractCompat.FontFamilyResult(source)

Fetch fonts given a font request.

Return

FontFamilyResult

Parameters

context

A Context to be used for fetching fonts.

cancellationSignal

A signal to cancel the operation in progress, or null if none. If the operation is canceled, then will be thrown when the query is executed.

request

A FontRequest object that identifies the provider and query for the request.

Throws

If requested package or authority was not found in the system.