A font manager for Android to apply custom font to whole app, support multi font and change font at runtime
AndroidFontManger is a font manager for Android:

Add JitPack to repositories in your project’s root build.gradle file:
allprojects {repositories {...maven { url 'https://jitpack.io' }}}
Add the dependency to your module’s build.gradle file:
dependencies {...implementation 'com.github.MostafaTaghipour:fontmanager:${version}'}

companion object {val exo: AppFontget() = AppFont.AppFontBuilder(1, "Exo", "fonts/exo/", "Exo-Regular", "ttf").thin("Exo-Thin").extraLight("Exo-ExtraLight").light("Exo-Light").regular("Exo-Regular").medium("Exo-Medium").semiBold("Exo-SemiBold").bold("Exo-Bold").extraBold("Exo-ExtraBold").black("Exo-Black").build()val taviraj: AppFontget() = AppFont.AppFontBuilder(2, "Taviraj", "fonts/taviraj/", "Taviraj-Regular", "ttf").thin("Taviraj-Thin").extraLight("Taviraj-ExtraLight").light("Taviraj-Light").regular("Taviraj-Regular").medium("Taviraj-Medium").semiBold("Taviraj-SemiBold").bold("Taviraj-Bold").extraBold("Taviraj-ExtraBold").black("Taviraj-Black").build()}
Activity Context:
override fun attachBaseContext(newBase: Context) {super.attachBaseContext(FontManager.wrapContext(newBase))}
FontManager.getInstance().currentFont = taviraj /* your desired font */
If you want use TextAppearances use the following code
<TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:text="some text"android:textAppearance="@style/Text.Subhead" ></TextView>
FontManager.applyTextAppearanceToTextView(this,textView,R.style.Text_Bold)
Mostafa Taghipour, mostafa@taghipour.me
AndroidFontManager is available under the MIT license. See the LICENSE file for more info.