C
Colin McGuire
Hi again. I have written the following small piece of code
Dim f As FontFamily
For Each f In System.Drawing.FontFamily.Families
Console.WriteLine(f.Name)
Next f
and when executed it prints out
Arial
Arial Black
Arial Narrow
Arial Unicode MS
Batang
Book Antiqua
Bookman Old Style
Century
..
..
..
How the heck do you get a list of the font styles (eg. Regular,
Italic, Bold, Bold Italic) and supported font sizes (8, 9, 10 11, 12,
14, 16 etc) for each of these font family names.
All I can figure is to
Dim ff as new Font(f.name,x)
where x is the font size. But you therefore have to know in advance
what x is and not all fonts support, for example, 6 point (if x is 6).
I guess what I am asking is in a font dialog box, how are the font
style and font sizes populated - where does this information come
from?
Thank you all very much again.
Colin
Dim f As FontFamily
For Each f In System.Drawing.FontFamily.Families
Console.WriteLine(f.Name)
Next f
and when executed it prints out
Arial
Arial Black
Arial Narrow
Arial Unicode MS
Batang
Book Antiqua
Bookman Old Style
Century
..
..
..
How the heck do you get a list of the font styles (eg. Regular,
Italic, Bold, Bold Italic) and supported font sizes (8, 9, 10 11, 12,
14, 16 etc) for each of these font family names.
All I can figure is to
Dim ff as new Font(f.name,x)
where x is the font size. But you therefore have to know in advance
what x is and not all fonts support, for example, 6 point (if x is 6).
I guess what I am asking is in a font dialog box, how are the font
style and font sizes populated - where does this information come
from?
Thank you all very much again.
Colin