Downloadable Fonts Android
Android introduced a downloadable fonts. Android Support Library 26 introduce support for APIs to request fonts from a provider application instead of bundling files into the APK or letting the APK download fonts. The feature is available on devices running Android API versions 14 and higher through the Support Library 26.
- Reduces the APK size
- Increases the app installation success rate
- Improves the overall system health as multiple APKs can share the same font through a provider. This saves users cellular data, phone memory, and disk space. In this model, the font is fetched over the network when needed.
Using Downloadable Fonts via Android Studio:
In the Layout Editor, select a TextView, and then under Properties, select fontFamily > More Fonts.
- The Resources window appears.
- In the Source drop-down list, select Google Fonts.
- In the Fonts box, select a font.
- Select Create downloadable font and click OK.
Now Android studio automatically generates the xml for it see the screenshot: