Reputation: 7314
I wan't to create a semi-bold font in VB.NET.
Why isn't semi-bold available in intellisense?
[screenshot]
I am using .NET 4.5.
Upvotes: 1
Views: 3417
Reputation: 21
Label1.Font = New Drawing.Font("Segoe UI Semibold", 10)
Add Semibold to font name.
Upvotes: 2
Reputation: 31394
System.Drawing.Fonts
does not support a SemiBold setting weight. The FontWeights is in the System.Windows namespace which is WPF/Silveright - which does support Semi-Bold. However System.Drawing.Fonts
is part of Windows Forms which does not.
WPF and Windows Forms use different rendering engines and are not compatible.
Upvotes: 1
Reputation: 13425
The answer is simple and is just available in front your eyes.
Just look with care the image you attached and MSDN Document:
System.Drawing.FontStyle is different from System.Windows.FontWeights.
A tip: no big deal, but for conscience' sake and future page visitors, you've cited something about .Net version 4.5... If you click on combo "Other versions", it will show the documentation page in others .Net versions.
So, in this case, System.Windows.FontWeights was introduced by .Net 3.0.
The more correct sentence is: .Net 3.0 (and up) is required to use System.Windows.FontWeights.
Upvotes: 1