Unable to make custom font work in Android like mentioned in below link.

https://developer.xamarin.com/guides/xamarin-forms/user-interface/text/fonts/#Using_a_Custom_Font

Any steps missing in the above link? I have added my ttf folder in Assets folder and then, trying to use the same name like
<OnPlatform.Android>Font/Lobster-Regular.ttf#Lobster-Regular</OnPlatform.Android>

Still, I see no change in my font style. Please help

Answers

  • Patil2421Patil2421 USMember ✭✭✭

    @KarthikRam

    Just copy the Font files to Asset folder, don't create any other folder in Assets.
    Change <OnPlatform.Android>Font/Lobster-Regular.ttf#Lobster-Regular</OnPlatform.Android>
    to
    <OnPlatform.Android>Lobster-Regular.ttf#Lobster-Regular</OnPlatform.Android>

    Make sure your Fonts BuildAction is set to AndroidAsset.
    If still this doesn't work then make sure your Fontname is correct "Lobster-Regular".

  • KarthikRamKarthikRam USMember ✭✭

    @Patil2421 Any idea how can I set custom font for Title property of the ContentPage. I am using Xamarin forms.

Sign In or Register to comment.