C#TrueType字体,真的吗? [英] C# TrueType font, really?

查看:79
本文介绍了C#TrueType字体,真的吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的错误

This is my Error

Only TrueType fonts are supported. This is not a TrueType font.



而我正在使用的只是



and all I am using is

if (fontDialog1.ShowDialog() == DialogResult.OK)
         {
           richtextbox1.font = fontDialog1.Font;
         }



我想知道我是否可以有这些选择

op1 =摆脱那个字体对话框中的非truetype字体
op2 =显示一条错误消息,告诉我选择另一种字体,并且不会使程序崩溃

所以是的,我想知道有人可以帮我解决truetype字体问题吗?



I want to know if i can have these options

op1= Get rid of the non-truetype fonts thats are in that font dialog
op2= show an error message that will tell me to pick another font and wont crash the program

so yeh I was wondering if some one can help me with the truetype font thing please

推荐答案

这是自VS2005以来一直存在的问题,AFAIK没有解决方案对此,不是一个可捕获的例外. http://c-madeeasy.blogspot. co.uk/2011/11/unsolved-this-is-not-true-type-font.html [ ColorPicker,FontPicker ... [
This is a problem which has been around since VS2005, AFAIK there is no solution to this, and the exception is not a catchable one. http://c-madeeasy.blogspot.co.uk/2011/11/unsolved-this-is-not-true-type-font.html[^]

However, you don''t have to use the MS FontDialog. Have a look at this: ColorPicker, FontPicker...[^] - I haven''t tried it, but it may solve your problem. Alternatively, your own font picker wouldn''t be too hard to produce.


这篇关于C#TrueType字体,真的吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆