Using Fonts in Android

Android O and Support Library 26 introduce new ways of working with fonts. You can now bundle fonts as resources by adding the font file in the res/font folder and use it like any other asset in XML layouts, styles or programmatically via the Typeface.

Instead of bundling your font files in the APK, you can now let the APK download them. Your app’s size is decreased and overall system health is improved, since multiple APKs can use the same font.

For more info, check out:
Working with…

Related Posts


  1. You say that preloaded fonts are loaded on app start. But if I set a preloaded font on a TextView in a 2nd activity, start the app, turn airplane mode on, and then start this 2nd activity, the default font is used.
    It only uses the downloadable font if I open the 2nd Activity with an active network connection.

  2. I love these new font features, but I would have expected something like on-demand font downloading without all this complicated font provider business. Apparently it is so because downloaded fonts can be used cross-app, and may contain malicious code.

  3. There has been many video about it and i think you have made effort in providing an awesome information. 🙂

    By the way, is it possible if i can have your advice in this open source android app I have posted below? I am still a beginner and many things to learn. I hope to get more feedback to improve it!…

    www . bit . ly/2GC3Ex8

    Apologize about the url having spaces in between because Youtube don't allow me to place url or anything related to Google Play url.. they are hidden by Youtube 🙁 As such this is a shortened url to prevent this issue. Will appreciate if i could trouble you to remove the spaces to access this app from google play store.

    thanks !

  4. Love how not .a single code example was using Kotlin..I fear that Kotlin's adoption rate will be much slower compared to swift given that Apple is much better than Google at making changes for everyone without caring for users initial discomfort

Leave a Reply

Your email address will not be published.

© 2022 Code As Pro - Theme by WPEnjoy · Powered by WordPress