title: (VB.net) How do I use a .ttf (font) file for a private font Collection
body: <p>Okay, so I am trying to use a privatefontcollection for my program to add a little bit of uniqueness to it. The font that I am using is not installed on computers by default. The font's name is youmurdererbb_reg. I have the font file in the resources folder and the file is in a .ttf format. Here is what i have so far:</p>
  
  <pre><code>Imports System.Drawing
  Imports System.Windows.Forms
  Imports System.Drawing.Text
  Imports System.Text
  
  Dim pc As New PrivateFontCollection
  
  
      Private Sub Main_Menu_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
  
          Try
              pc.AddFontFile(YouMurderer)
          Catch ex As Exception
              Trace.WriteLine(ex.ToString)
          End Try
  
      End Sub
  
  
      Private Sub Main_Menu_Paint(sender As Object, e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
  
      Dim Fnt As Font = New Font(pc.Families(0), 80, FontStyle.Regular)
      e.Graphics.DrawString("This is the text that is being drawn", Fnt, Brushes.Black, 10, 10)
  
      End Sub
  </code></pre>
  
  <p>Now where i declared the Private Font Collection, I have tried these different things to get it to work:</p>
  
  <pre><code>Dim YouMurderer As String = Encoding.ASCII.GetString(My.Resources.youmurdererbb_reg)
  
  Dim YouMurderer As String = Convert.ToString(My.Resources.youmurdererbb_reg)
  
  Dim YouMurderer As String = Convert.ToBase64String(My.Resources.youmurdererbb_reg)
  
  Dim YouMurderer As String = Encoding.UTF8.GetString(My.Resources.youmurdererbb_reg)
  </code></pre>
  
  <p>But whichever one I choose, it just shows the entire form with a large red "X" (Like a pictureboxes' "ErrorImage") (I have a picture set to the forms background as additional information).</p>
  
  <p>Another problem is that if i don't try to convert it:</p>
  
  <pre><code>Dim YouMurderer As String = My.Resources.youmurdererbb_reg
  </code></pre>
  
  <p>Then it comes up with the error of:</p>
  
  <pre><code>Value of type '1-dimensional array of Byte' cannot be converted to 'String'.
  </code></pre>
  
  <p>I need help with this in .NET (Framework 4)! The entire program is being written in VB.net, not C#, or C++, or JAVA.</p>