I'm using ArcGIS Runtime in Xamarin Forms.
I want to display icons on the map using an icon font.
I'm using the same icon font - Material Design Icons - throughout the rest of my app successfully.
I have tried lots of ways to specify the font name and none work.
Here is how I use the font elsewhere via app.xaml
<OnPlatform x:Key="MaterialFontFamily" x:TypeArguments="x:String">
<On Platform="iOS" Value="Material Design Icons" />
<On Platform="Android" Value="materialdesignicons-webfont.ttf#Material Design Icons" />
<On Platform="UWP" Value="Assets/materialdesignicons-webfont.ttf#Material Design Icons" />
</OnPlatform>
I'm testing on UWP so I started out trying to get a map pin to display on that.
Here is my code:
public static TextSymbol GetJobSymbol(string jobStatusColourHex)
{
var color = ColorConverters.FromHex(jobStatusColourHex);
var symbol = new TextSymbol()
{
Text = IconFont.MapMarker,
Color = color,
Size = 30,
FontFamily = "Assets/materialdesignicons-webfont.ttf#Material Design Icons"
};
return symbol;
}
I'm using a mapping file for the icon codes - IconFont.MapMarker equates to "\uf34e"
I tried the following combinations of font name, sub-name and location:
Assets/materialdesignicons-webfont.ttf#Material Design Icons
Assets/materialdesignicons-webfont.ttf
Assets/materialdesignicons-webfont
materialdesignicons-webfont.ttf#Material Design Icons
materialdesignicons-webfont.ttf
materialdesignicons-webfont
This is what I get each time:
Any ideas?