Results 1 to 2 of 2

Thread: Brush Script MT not bold??

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    14

    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!

  2. #2
    Master Of Orion ForumAccount's Avatar
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    2,802

    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:
    1. Private Sub btnBold_Click(ByVal sender As System.Object, _
    2.                           ByVal e As System.EventArgs) _
    3.                           Handles btnBold.Click
    4.     If btnBold.CheckState = CheckState.Checked Then
    5.         btnBold.CheckState = CheckState.Unchecked
    6.         _FontStyle = FontStyle.Italic
    7.     Else
    8.         btnBold.CheckState = CheckState.Checked
    9.         _FontStyle = FontStyle.Bold Or FontStyle.Italic
    10.     End If
    11.     _FontSize = 12
    12.     _FontName = lbxFonts.SelectedItem
    13.     Dim _NewFont As New Font(_FontName, _FontSize, _FontStyle)
    14. 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
  •  



Click Here to Expand Forum to Full Width