In my previous projects, I have used Calligraphy library to set a font for a whole application. But it requires storing font file in assets which makes APK size bigger. Now I am wondering is it possible to set a downloadable font as default for a whole application.
I could set a downloadable font for only ONE TextView.
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin"
android:fontFamily="@font/lato"
android:text="@string/large_text" />
Yes, I know I could create MyTextView class and set downloadable font programmatically. But I do not think it is a good idea as text can be anywhere in EditText, Spinner item, Toast.
So my question is how to set a downloadable font for a whole application as default font?
A library to help with custom fonts and text sizes
The goal of this library is to allow your app to support multiple FontFamilies (e.g. lato, roboto, etc.) with their own styles (e.g. normal, bold, italic) in an easily-configurable way.