Download and use FontFamily in Xamarin Android app

I am trying to download and use the Montserrat font family but I can't understand how to use the ttf file in my xamarin android project. I am downloading the ttf from this site https://fonts.google.com/ . Can anyone help me? Thanks a lot.

Upvotes: 1

Views: 542

Answers (1)

momvart
momvart

Reputation: 1999

You can work with fonts in android using Typeface. To use your custom downloaded fonts put them in your assets folder (better to make a subfolder named Fonts) then make a typeface using:

Typeface.CreateFromAsset(Application.Context.Assets, "Fonts/yourfontname.ttf");

Upvotes: 2

Related Questions