Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Preview custom fonts in Android Studio

Currently I'm using the pixlui library to use custom fonts, and it's great! https://github.com/neopixl/PixlUI

Is there any way to preview the custom fonts in Android Studio?

like image 928
TomCB Avatar asked Aug 17 '14 15:08

TomCB


People also ask

How do I set text font view?

If you are using Android Studio 3.5+, Changing the font is super simple. Select the text widget on the Design view and check the font family on Attribute Window. The value dropdown contains all the available fonts from which you can select one. If you are looking for Google Fonts, Click the More Fonts option.


1 Answers

I have created a Library called Smart Fonts for Android. It allows you to preview the custom fonts in the Layout Editor of Android Studio.

The fonts are cached in memory so that they are loaded once.

Smart Fonts is easy to integrate with gradle, it is documented and available on GitHub:

https://github.com/smart-fun/SmartFonts

enjoy!

like image 169
Arnaud SmartFun Avatar answered Oct 11 '22 23:10

Arnaud SmartFun