InflationX / Calligraphy

Custom fonts in Android the easy way...
Apache License 2.0
1.09k stars 83 forks source link

Can't set font on view via theme attr #12

Closed jbarr21 closed 5 years ago

jbarr21 commented 5 years ago

I get the following log when I set a fontPath pointing to a theme attr

Error:

Calligraphy  W  Can't create asset from ?2130968815. Make sure you have passed in the correct path and file name.
                         W  java.lang.RuntimeException: Font asset not found ?2130968815
                         W      at android.graphics.Typeface.createFromAsset(Typeface.java:839)
                         W      at io.github.inflationx.calligraphy3.TypefaceUtils.load(TypefaceUtils.java:35)

Layout:

<TextView
        android:id="@+id/text"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        ...
        fontPath="?boldFontPath"
        >