Home:  Support:  Search:

Error using fonts in Visual Studio.NET IDE
Only TrueType fonts are supported and this is not a TrueType font.

The above problem occurs when attempting to select an IDAutomation font for any Windows Forms control using the control properties window in the Visual Studio.NET IDE.

Microsoft is aware of the font problem in Visual Studio.NET. Below are two suggested solutions for this issue.

Solution(s):

Solution 1:
After selecting the font in the properties window of the VS.NET IDE, the error message "Only TrueType fonts are supported and this is not a TrueType 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. 

This example is in VB.NET:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
     Label1.Font = New Font("sadhc39b", 14, FontStyle.Regular)
End Sub


This example is in C#
private void Form1_Load(object sender, System.EventArgs e)

     label1.Font = new Font("sadhc39b", 14, FontStyle.Regular);
}

Related Documents and Keywords:

See also:

TSI

 

Copyright © 2002-2006, IDAutomation.com, Inc. All rights reserved. All trademarks mentioned are the property of their respective owners. 

Over 70% of Fortune 100 companies use IDAutomation's products to automate their businesses.