Interface

Font.ResourceLoader

Interface used to load a font resource.

Source set: Common
@Deprecated(
        "Replaced with FontFamily.Resolver during the introduction of async fonts, " +
            "all usages should be replaced. Custom subclasses can be converted into a " +
            "FontFamily.Resolver by calling createFontFamilyResolver(myFontFamilyResolver, context)"
    )
    public interface ResourceLoader

Interface used to load a font resource.

Functions

load

Source set: Common
@Deprecated(
            "Replaced by FontFamily.Resolver, this method should not be called",
            ReplaceWith("FontFamily.Resolver.resolve(font, )"),
        )
        public fun load(font: Font): Any

Loads resource represented by the Font object.

Parameters

font Font to be loaded

Return

platform specific typeface

Throws: Exception

if font cannot be loaded

Throws: IllegalStateException

if font cannot be loaded

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: