I am trying to get a custom font to display in the Android project of my Xamarin forms solution. But cannot get it to work.
I have copied the TTF file into the assets folder on my Android project. Its build action is AndroidAsset and I have tried all the CopyToOutputDirectory options.
I am trying to display my font in a label in Xaml with this code (plus a bunch of other variants on this code):
<Label Text="Hello Forms with XAML"> <Label.FontFamily> <OnPlatform x:TypeArguments="x:String"> <On Platform="Android" Value="BRADHITC.TTF#Bradley Hand ICT"/> </OnPlatform> </Label.FontFamily> </Label>
Does anyone know what I am missing here?
Thanks in advance,