Custom fonts using Resource Dictionary in Xamarin Forms – Android


If you have bit of experience with Mobile or Web development, you might have noticed most of the clients or end user’s expectations are gone high. One of the best way is to add custom font and you can feel big difference on how app’s look and feel.

iOS and MacOS preinstalled fonts

Android preinstalled font

Android default

For fonts to work on the app, they have to be installed in the app. Below is the example of adding font files in android inside Assets folder.

Define the font in the application resources in app.xml file as shown below

            <OnPlatform x:TypeArguments="x:String"
                <On Platform="Android"
                    Value="Poppins-Light.ttf#Poppins" />

Now we have to create styles as shown below

        <Style x:Key="IssueHeader"
            <Setter Property="FontFamily"
                    Value="{StaticResource PoppinsLight}" />

Then we can use it as shown below

<Label Style="{StaticResource IssueHeader}" Text="Hello World" />





Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: