My custom fonts (inside X.Forms) in iOS, macOS are working perfectly as detailed in the documentations
I added a WPF project (VS2017) as per documentation and MainPage.XAML contents are visible except the custom font
MainPage.XAML contains only one label with custom font set. Here are the steps I did in WPF project
- Inside the WPF project, created a folder named Assets/Fonts. Added a TTF file.
- Set the build action to Content + Copy Always
- In the MainPage.xaml (of XForms), added the following
<Label Text="Hollywood Hills" FontSize="24" TextColor="Silver" x:Name="customFontText">
<Label.FontFamily>
<OnPlatform x:TypeArguments="x:String" >
<On Platform ="WPF">Assets/Fonts/HollywoodHills.ttf/#Hollywood Hills</On>
<On Platform="iOS, macOS">Hollywood Hills</On>
</OnPlatform>
</Label.FontFamily>
</Label>
- Even tried starting with /Assets.....
- But no luck