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 ?
asked Jul 18, 2012 at 23:23
3
This happens when you install new fonts while Visual Studio is running. Close Visual Studio, and then reopen it. The problem will be solved.
answered Aug 10, 2016 at 9:54
M. JahedbozorganM. Jahedbozorgan
6,9142 gold badges46 silver badges51 bronze badges
1
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’
answered Nov 14, 2020 at 19:30
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.
answered Nov 23, 2020 at 11:04
cuilstercuilster
1231 silver badge12 bronze badges
Use nuget WpfColorFontDialog in the WPF projects instead, this supports OpenType fonts.
answered May 9, 2017 at 13:52
Tomas KubesTomas Kubes
24k18 gold badges112 silver badges151 bronze badges
Try
private void Form1_Load(object sender, System.EventArgs e) {
label1.Font = new Font("myFont", 12, FontStyle.Regular);
}
answered Feb 15, 2020 at 15:32
Waruna ManjulaWaruna Manjula
3,0871 gold badge34 silver badges33 bronze badges
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 ?
asked Jul 18, 2012 at 23:23
3
This happens when you install new fonts while Visual Studio is running. Close Visual Studio, and then reopen it. The problem will be solved.
answered Aug 10, 2016 at 9:54
M. JahedbozorganM. Jahedbozorgan
6,9142 gold badges46 silver badges51 bronze badges
1
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’
answered Nov 14, 2020 at 19:30
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.
answered Nov 23, 2020 at 11:04
cuilstercuilster
1231 silver badge12 bronze badges
Use nuget WpfColorFontDialog in the WPF projects instead, this supports OpenType fonts.
answered May 9, 2017 at 13:52
Tomas KubesTomas Kubes
24k18 gold badges112 silver badges151 bronze badges
Try
private void Form1_Load(object sender, System.EventArgs e) {
label1.Font = new Font("myFont", 12, FontStyle.Regular);
}
answered Feb 15, 2020 at 15:32
Waruna ManjulaWaruna Manjula
3,0871 gold badge34 silver badges33 bronze badges
Level 2 401 / 275 / 48 Регистрация: 22.11.2010 Сообщений: 785 Записей в блоге: 1 |
|
1 |
|
11.12.2010, 20:35. Показов 11696. Ответов 2
Я вот пытаюсь применить к кнопке шрифт GOST Type A, но он пишет что этот шрифт не является шрифтом TrueType… Что то сделать с этим можно? Многие шрифты пишут это…
0 |
Programming Эксперт 94731 / 64177 / 26122 Регистрация: 12.04.2006 Сообщений: 116,782 |
11.12.2010, 20:35 |
2 |
Light Knight 106 / 29 / 5 Регистрация: 03.06.2010 Сообщений: 361 |
|
12.12.2010, 19:00 |
2 |
использовать шрифты TrueType
0 |
8 / 8 / 1 Регистрация: 16.02.2011 Сообщений: 155 |
|
19.08.2015, 15:22 |
3 |
Бывает такое, что во время запущенной visual studio ищешь и устанавливаешь шрифт. Потом выбираешь его в visual studio, а он ругается, мол он не TrueType… Нужно перезагрузить visual studio и, если шрифт в установочном окне описан как «truetupe», то в последующем он без проблем встанет в visual studio
1 |
IT_Exp Эксперт 87844 / 49110 / 22898 Регистрация: 17.06.2006 Сообщений: 92,604 |
19.08.2015, 15:22 |
3 |
- Remove From My Forums
-
Question
-
Hello, when choosing a font that’s not a TrueType, I get this exception:
An unhandled exception of type ‘System.ArgumentException’ occurred in System.Drawing.dll
Additional information: Only TrueType fonts are supported. This is not a TrueType font.
— I either need to some how remove all the non-TrueType fonts from the dialog, or change something else in order for them to work…
private: System::Void fontToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) { FontDialog^ fontDialog1 = gcnew FontDialog(); if(fontDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK) { this->richTextBox1->SelectionFont = fontDialog1->Font; } }
Any help? Thanks.
Just Learning. No hard feelings if I seem very dumb.
-
Moved by
Monday, December 20, 2010 7:56 AM
Windows form issue (From:Visual C++ General)
-
Moved by
Answers
-
Notepad is a native application (not a WinForms application). This is a limitation of WinForms applications (hopefully the next version fixes this problem).
See the remarks in System::Drawing::Font for more information:
http://msdn.microsoft.com/en-us/library/system.drawing.font.aspx
For more information about how to construct fonts, see How to: Construct Font Families and Fonts
. Windows Forms applications support TrueType fonts and have limited support for OpenType fonts. If you attempt to use a font that is not supported, or the font is not installed on the machine that is running the application, the Microsoft Sans Serif
font will be substituted.
David Cravey
-
Marked as answer by
Aspen VJ
Monday, December 27, 2010 2:49 AM
-
Marked as answer by
- Remove From My Forums
-
Question
-
Hello, when choosing a font that’s not a TrueType, I get this exception:
An unhandled exception of type ‘System.ArgumentException’ occurred in System.Drawing.dll
Additional information: Only TrueType fonts are supported. This is not a TrueType font.
— I either need to some how remove all the non-TrueType fonts from the dialog, or change something else in order for them to work…
private: System::Void fontToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) { FontDialog^ fontDialog1 = gcnew FontDialog(); if(fontDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK) { this->richTextBox1->SelectionFont = fontDialog1->Font; } }
Any help? Thanks.
Just Learning. No hard feelings if I seem very dumb.
-
Moved by
Monday, December 20, 2010 7:56 AM
Windows form issue (From:Visual C++ General)
-
Moved by
Answers
-
Notepad is a native application (not a WinForms application). This is a limitation of WinForms applications (hopefully the next version fixes this problem).
See the remarks in System::Drawing::Font for more information:
http://msdn.microsoft.com/en-us/library/system.drawing.font.aspx
For more information about how to construct fonts, see How to: Construct Font Families and Fonts
. Windows Forms applications support TrueType fonts and have limited support for OpenType fonts. If you attempt to use a font that is not supported, or the font is not installed on the machine that is running the application, the Microsoft Sans Serif
font will be substituted.
David Cravey
-
Marked as answer by
Aspen VJ
Monday, December 27, 2010 2:49 AM
-
Marked as answer by