mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-17 03:17:17 +01:00
39 lines
2.4 KiB
Java
39 lines
2.4 KiB
Java
package androidx.compose.ui.platform;
|
|
|
|
import android.content.Context;
|
|
import android.graphics.Typeface;
|
|
import androidx.compose.runtime.internal.StabilityInferred;
|
|
import androidx.compose.ui.text.font.Font;
|
|
import androidx.compose.ui.text.font.ResourceFont;
|
|
import com.google.gson.Gson$$ExternalSyntheticBUOutline0;
|
|
import kotlin.Deprecated;
|
|
import kotlin.Metadata;
|
|
import kotlin.ReplaceWith;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@StabilityInferred(parameters = 0)
|
|
@Deprecated(message = "Replaced with PlatformFontLoader during the introduction of async fonts, all usages should be replaced", replaceWith = @ReplaceWith(expression = "PlatformFontLoader", imports = {}))
|
|
@Metadata(d1 = {"\u0000\u001e\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\b\u0001\u0018\u00002\u00020\u0001B\u000f\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0004\b\u0004\u0010\u0005J\u0010\u0010\u0006\u001a\u00020\u00072\u0006\u0010\b\u001a\u00020\tH\u0017R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\n"}, d2 = {"Landroidx/compose/ui/platform/AndroidFontResourceLoader;", "Landroidx/compose/ui/text/font/Font$ResourceLoader;", "context", "Landroid/content/Context;", "<init>", "(Landroid/content/Context;)V", "load", "Landroid/graphics/Typeface;", "font", "Landroidx/compose/ui/text/font/Font;", "ui_release"}, k = 1, mv = {2, 0, 0}, xi = 48)
|
|
/* loaded from: classes13.dex */
|
|
public final class AndroidFontResourceLoader implements Font.ResourceLoader {
|
|
public static final int $stable = 8;
|
|
|
|
@NotNull
|
|
private final Context context;
|
|
|
|
public AndroidFontResourceLoader(@NotNull Context context) {
|
|
this.context = context;
|
|
}
|
|
|
|
@Override // androidx.compose.ui.text.font.Font.ResourceLoader
|
|
@Deprecated(message = "Replaced by FontFamily.Resolver, this method should not be called", replaceWith = @ReplaceWith(expression = "FontFamily.Resolver.resolve(font, )", imports = {}))
|
|
@NotNull
|
|
public Typeface load(@NotNull Font font) {
|
|
if (font instanceof ResourceFont) {
|
|
return AndroidFontResourceLoaderHelper.INSTANCE.create(this.context, ((ResourceFont) font).getResId());
|
|
}
|
|
Gson$$ExternalSyntheticBUOutline0.m((Object) font, "Unknown font type: ");
|
|
return null;
|
|
}
|
|
}
|