Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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 font I installed is ttf .. why ? and how to fix this ?

like image 304
vexe Avatar asked Jul 18 '12 23:07

vexe


People also ask

What does |= mean in C?

The ' |= ' symbol is the bitwise OR assignment operator.

What is '~' in C programming?

In mathematics, the tilde often represents approximation, especially when used in duplicate, and is sometimes called the "equivalency sign." In regular expressions, the tilde is used as an operator in pattern matching, and in C programming, it is used as a bitwise operator representing a unary negation (i.e., "bitwise ...

What are operators in C?

C operators are one of the features in C which has symbols that can be used to perform mathematical, relational, bitwise, conditional, or logical manipulations. The C programming language has a lot of built-in operators to perform various tasks as per the need of the program.

What is the use of in C?

In C/C++, the # sign marks preprocessor directives. If you're not familiar with the preprocessor, it works as part of the compilation process, handling includes, macros, and more.


3 Answers

This happens when you install new fonts while Visual Studio is running. Close Visual Studio, and then reopen it. The problem will be solved.

like image 150
CSharper Avatar answered Oct 01 '22 03:10

CSharper


After downloading the font, I simply double-clicked it and hit 'Install'. However, this did not work, the font was not displayed in Win 10 Font Settings, besides that it was in the /Windows/Fonts/ folder. Some programs did find the font (such as Gimp), others, like VS or even Win10 itself - did not find them. After a restart, the font was not shown again (until a new double-ckicl/install).


Solution: Right-click on the Font and select 'Install for all Users'

like image 27
nonsensation Avatar answered Oct 01 '22 05:10

nonsensation


Have font with License "Source Sans Pro". Installed and usable in every MS-Application. For VS Forms-Project, i needed to "reinstall" it with

Right-click on the Font and select 'Install for all Users'

After VS restart, the misleading error vanished.

like image 33
cuilster Avatar answered Oct 01 '22 04:10

cuilster