DB螺旋体字体不以iPhone -Xamarin形式工作



我正在使用Xamarin表单应用中的自定义DB-螺旋A。我在iOS和Android中添加了.ttf文件。对于Android,它正在按预期工作。但是对于iOS,我看不到字体。

我在info.plist中添加了字体,并将这些资源添加为捆绑资源。

没有有关如何加载它们的更多信息(代码(,很难知道发生了什么。但是,您以不同的方式在iOS上加载字体。加载字体时,这是一个常见的问题。另外,请确保您用于该字体的名称。

如何在3个平台上加载字体。

<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/Fonts/materialdesignicons-webfont.ttf#Material Design Icons" />
</OnPlatform>

最新更新