in C# winform, I got: “only truetype fonts are supported. This is not a TrueType Font”

后端 未结 5 436
孤街浪徒
孤街浪徒 2021-01-01 13:05

I have C# winform, I installed a couple of ttf fonts, but when i set the text box font to any of the ones i downloaded, i get this error Even though I\'m 100% sure that the

5条回答
  •  我在风中等你
    2021-01-01 13:29

    Try

    private void Form1_Load(object sender, System.EventArgs e) {
        label1.Font = new Font("myFont", 12, FontStyle.Regular);
    }
    

提交回复
热议问题