Thursday, December 30, 2010

Error using fonts in the VisualStudio.NET - "Only TrueType fonts are supported and this is not a TrueType font"

Solution 1:
After selecting the font in the properties window of the VS.NET IDE, the error message "Only True-type fonts are supported and this is not a True Type font" will be reported. Click OK, and then close VS.NET. Re-open VS.NET, followed by the project; select the font in the properties window, the error will no longer be generated.
Solution 2:
In the Visual Studio.NET application, reference and apply the fonts through the code window of the application. The following example assigns the evaluation version of IDAutomation's Code 39 Font with the human readable text displayed on a label in a form during the Form_Load event.

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

No comments:

Post a Comment