0

我尝试使用一种中文字体HGDH_CNKI.TTF。我把它放进去sbid/Assets/Fonts/(我的项目名称是sbid)。

然后我像这样尝试,我使用:

<Button Command="{Binding AddProtocol}" FontFamily="/Assets/Fonts/HGDH_CNKI.TTF#HGDH_CNKI">新协议&lt;/Button>

或者

<Button Command="{Binding AddProtocol}" FontFamily="avares://sbid/Assets/Fonts/HGDH_CNKI.TTF#HGDH_CNKI">新协议&lt;/Button>

它仍然不起作用。我还需要做什么其他步骤吗?

4

1 回答 1

0

我发现Avalonia 不支持中文字体家族.ttf我使用 FontCreator将文件的字体系列更改为英文。一切都好。

于 2020-07-10T15:55:31.643 回答