How to include external font in Avalonia application without installing it

无人久伴 提交于 2020-07-10 10:24:20

问题


I try to use a kind of Chinese fonts HGDH_CNKI.TTF. I put it into sbid/Assets/Fonts/ (my project name is sbid).

And then I try it like this, I use:

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

or

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

It still doesn't work. Is there any other steps I need to do?

来源:https://stackoverflow.com/questions/62816456/how-to-include-external-font-in-avalonia-application-without-installing-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!