package defpackage;

import android.content.res.Resources;
import android.graphics.Paint;
import android.graphics.Typeface;
import android.graphics.fonts.Font;
import android.graphics.text.PositionedGlyphs;
import android.graphics.text.TextRunShaper;
import android.os.Build;
import android.os.Trace;

/* renamed from: ᵽᵿᵳ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public abstract class AbstractC5382 {

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public static Paint f20171;

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public static final ˀʾˀᵛ f20172;

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public static final C3457 f20173;

    static {
        Trace.beginSection(ˉˇʨ.ˎˑː("TypefaceCompat static init"));
        int i = Build.VERSION.SDK_INT;
        if (i >= 31) {
            f20172 = new C4023();
        } else if (i >= 29) {
            f20172 = new C0552();
        } else if (i >= 28) {
            f20172 = new C3629();
        } else if (i >= 26) {
            f20172 = new C5284();
        } else if (i < 24 || C1842.f7457 == null) {
            f20172 = new C2025();
        } else {
            f20172 = new C1842();
        }
        f20173 = new C3457(16);
        f20171 = null;
        Trace.endSection();
    }

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public static Typeface m11033(String str) {
        if (str != null && !str.isEmpty()) {
            Typeface typefaceCreate = Typeface.create(str, 0);
            Typeface typefaceCreate2 = Typeface.create(Typeface.DEFAULT, 0);
            if (typefaceCreate != null && !typefaceCreate.equals(typefaceCreate2)) {
                return typefaceCreate;
            }
        }
        return null;
    }

    /* JADX WARN: Code restructure failed: missing block: B:42:0x00c0, code lost:
    
        r1 = r8.build();
     */
    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static android.graphics.Typeface m11034(android.content.Context r12, defpackage.InterfaceC0919 r13, android.content.res.Resources r14, int r15, java.lang.String r16, int r17, int r18, defpackage.C3959 r19, boolean r20) {
        /*
            Method dump skipped, instructions count: 612
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: defpackage.AbstractC5382.m11034(android.content.Context, ˇʓˎˎ, android.content.res.Resources, int, java.lang.String, int, int, ᵫᵘˁ, boolean):android.graphics.Typeface");
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public static String m11035(Resources resources, int i, String str, int i2, int i3) {
        return resources.getResourcePackageName(i) + '-' + str + '-' + i2 + '-' + i + '-' + i3;
    }

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public static Font m11036(Typeface typeface) {
        if (f20171 == null) {
            f20171 = new Paint();
        }
        f20171.setTextSize(10.0f);
        f20171.setTypeface(typeface);
        PositionedGlyphs positionedGlyphsShapeTextRun = TextRunShaper.shapeTextRun((CharSequence) " ", 0, 1, 0, 1, 0.0f, 0.0f, false, f20171);
        if (positionedGlyphsShapeTextRun.glyphCount() == 0) {
            return null;
        }
        return positionedGlyphsShapeTextRun.getFont(0);
    }
}
