androidimageandroid-studiotexticon-fonts

How to use desired font in Image Asset in Android Studio?


I was trying to change the application icon of my project. I figured out i had to use Image Asset to create it. I chose the background image and while i chose the foreground to have text. I couldn't use a custom font in it. Any solutions?

Image link to my problem: https://i.sstatic.net/nDPmy.png

Can't upload image as i don't have enough reputation points yet.

I tried to check the xml files created by it after clicking OK.. but couldn't find any font-family attribute there. Also tried to search how to add custom fonts to source asset but with no success I only found the answers to add them to the project instead of Image Asset.


Solution

  • According to the documentation

    You can use the fonts that are installed on your computer.

    So you should first install the font, then you should be able to see it in the selector.

    Install a font on Mac

    Install a font on Windows10

    Edit: found a duplicate of your question