我试着用一种中文字体HGDH_CNKI.TTF。我把它放入了sbid/Assets/Fonts/ (我的项目名是sbid)。
然后我像这一样尝试,我使用:
<Button Command="{Binding AddProtocol}" FontFamily="/Assets/Fonts/HGDH_CNKI.TTF#HGDH_CNKI">新协议</Button>或
<Button Command="{Binding AddProtocol}" FontFamily="avares://sbid/Assets/Fonts/HGDH_CNKI.TTF#HGDH_CNKI">新协议</Button>还是不起作用。还有什么其他的步骤我需要做吗?
发布于 2020-07-10 15:55:31
我发现Avalonia不支持中文字体家族。我将.ttf文件的字体系列更改为英文,使用FontCreator。一切都很好。
https://stackoverflow.com/questions/62816456
复制相似问题