|
-
Sep 21st, 2010, 08:20 AM
#1
Thread Starter
New Member
Brush Script MT not bold??
Hello,
If I use the following code and I select the font 'Brush Script MT', I get an error that the font does not support Bold.
However, when I use this font in MS Word, I can make it Bold .
Code:
Private Sub btnBold_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBold.Click
If btnBold.CheckState = CheckState.Checked Then
btnBold.CheckState = CheckState.Unchecked
_FontStyle = FontStyle.Regular
Else
btnBold.CheckState = CheckState.Checked
_FontStyle = FontStyle.Bold
End If
_FontSize = 12
_FontName = lbxFonts.SelectedItem
Dim _NewFont As New Font(_FontName, _FontSize, _FontStyle)
End Sub
So apparantly it is possible to make this font Bold. Does anybody have a solution for this problem?
Thanks!
-
Sep 21st, 2010, 10:18 AM
#2
Re: Brush Script MT not bold??
The reason this is happening is because this font requires Italics. So if you want to have a bold Brush Script MT then you have to do something like this:
vb.net Code:
Private Sub btnBold_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles btnBold.Click
If btnBold.CheckState = CheckState.Checked Then
btnBold.CheckState = CheckState.Unchecked
_FontStyle = FontStyle.Italic
Else
btnBold.CheckState = CheckState.Checked
_FontStyle = FontStyle.Bold Or FontStyle.Italic
End If
_FontSize = 12
_FontName = lbxFonts.SelectedItem
Dim _NewFont As New Font(_FontName, _FontSize, _FontStyle)
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|