We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Font Family

Thread ID:





130698 May 26,2017 03:13 PM UTC May 30,2017 03:51 PM UTC Xamarin.Forms 1
Tags: SfChart
Costanza Federica Minarelli
Asked On May 26, 2017 03:13 PM UTC

I'm trying to change PrimaryAxis font family as:

MyChart.PrimaryAxis.LabelStyle.Font = Font.OfSize("Arial  ",14);

or using xaml as:

     <chart:ChartAxisLabelStyle TextColor="White" LabelsPosition="Inside">
               <Font FontSize="14" FontFamily="Arial"/>

but without success.
Can anyone help me?

Saravana Pandian Murugan [Syncfusion]
Replied On May 30, 2017 03:51 PM UTC

Hi Costanza, 
Sorry for the delay. 
If we set the default FontFamily which are available in mobile phones, it will work by default. If we set custom FontFamily, it wouldn`t work. In your sample, you have set the “Arial” font which is a custom font. So, we need to follow the below platform specific steps to set custom FontFamily. For Example, 
In Xamarin.Forms Android platform: 
1. Download the custom font (arial.ttf) file. 
2. Add that font file to the Assets folder in the application project. 
3. Set Build Action = AndroidAsset. 
4. Then, use the below code snippet in your application. 
Code Snippet: 
         <Font FontSize="20" FontFamily="arial.ttf#arial "/> 
In Xamarin.Forms iOS and UWP platforms, the above mentioned four steps will change slightly. 
Please refer the below link for more details about how to set custom font. 
We have attached a sample for your reference which can be downloaded from the following location. 
Note: This sample will work only in UWP platform. We are facing issues in Android and iOS platform. We will update you with more details in one business day (May 31, 2017). 
Saravana Pandian M. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon