I am trying to display a custom font icon using the custom font(TTF file) file in Xamarin forms WPF platform. For applying custom font we need to set correct font family for displaying the custom font icon. In Xamarin forms UWP platform they have used the below code for applying the font family.
Code:
this.CustomControl.FontFamily = new FontFamily("ms-appx:///CustomControl.UWP/Assets/Fonts/BadgeIcons.ttf#Badge icon");
I tried to achieve the same In the WPF platform but the custom font icons are not visible. I tried the code mentioned in the below link:
The code I used is provided below:
this.CustomControl.FontFamily = new FontFamily(new Uri("ms-appx:///CustomControl.WPF/resources/"), "./resources/#Badge icon");
I am not obtaining the correct font family so the icon is not displayed in the Xamarin forms WPF platform. Can anyone please help me to resolve this problem.