M
MichaelL
I'm trying to print labels and need to use the courier font(not
'courier new') so my horizontal and vertical spacing matches up with
the labels. I've tried using other proportional/monospace fonts but
they don't have proper spacing for my labels and I know that 'courier'
would work.When you 'hover' over the printFont variable, it shows
'Microsoft Sans Serif" as the FontFamily even though I've set to
'Courier'. Other fonts do not have this problem but, the labels are
no good with other fonts. The 'for' loop below doesn't include
'courier' as a part of its output and I'm sure that is a clue but I
don't know what to do with that clue. I know that the courier font is
installed on my machine because it's available to outlook, word, and
even Visual Studio's text editor, however, its just not available to
be used by PrintDocument/Font namespace/class. Any help would be
greatly appreciated.
Imports System.Drawing
Dim printFont As System.Drawing.Font
printFont = New System.Drawing.Font("Courier", 8)
Dim oneFontFamily As System.Drawing.FontFamily
For Each oneFontFamily In System.Drawing.FontFamily.Families
Debug.WriteLine(oneFontFamily.Name)
Next
'courier new') so my horizontal and vertical spacing matches up with
the labels. I've tried using other proportional/monospace fonts but
they don't have proper spacing for my labels and I know that 'courier'
would work.When you 'hover' over the printFont variable, it shows
'Microsoft Sans Serif" as the FontFamily even though I've set to
'Courier'. Other fonts do not have this problem but, the labels are
no good with other fonts. The 'for' loop below doesn't include
'courier' as a part of its output and I'm sure that is a clue but I
don't know what to do with that clue. I know that the courier font is
installed on my machine because it's available to outlook, word, and
even Visual Studio's text editor, however, its just not available to
be used by PrintDocument/Font namespace/class. Any help would be
greatly appreciated.
Imports System.Drawing
Dim printFont As System.Drawing.Font
printFont = New System.Drawing.Font("Courier", 8)
Dim oneFontFamily As System.Drawing.FontFamily
For Each oneFontFamily In System.Drawing.FontFamily.Families
Debug.WriteLine(oneFontFamily.Name)
Next