开发者

Use a .ttf font in windows 6.5 C#

开发者 https://www.devze.com 2023-03-14 21:35 出处:网络
I try to use a .ttf file as my default application font but I haven\'t find how to load it... I\'ve tried this :

I try to use a .ttf file as my default application font but I haven't find how to load it... I've tried this :

customFont = new Font("MyProject.res.sony_sketch.ttf", 10F, FontStyle.Regular);

But when I use customFont, it displays the de开发者_运维知识库fault one... Can anyone help me ? Thanks !


The first argument to that constructor if the font family name, you need to first install the font, and then reference it by family name.

0

精彩评论

暂无评论...
验证码 换一张
取 消