Retrieving a list of available fonts on system.

  • Thread starter Thread starter Jonesgj
  • Start date Start date
J

Jonesgj

Hi,


How would I return a list of available fonts. I'm writing a simple word
processor, and have got the font dialog working, but wanted to create a
toolbar dropdown with a list of fonts in, instead.

I'm not a 'hardened programmer' ;-) so any simple examples out there??

Thanks in antipation

jonesG
 
Jonesgj said:
Hi,


How would I return a list of available fonts. I'm writing a simple word
processor, and have got the font dialog working, but wanted to create a
toolbar dropdown with a list of fonts in, instead.

I'm not a 'hardened programmer' ;-) so any simple examples out
there??

Thanks in antipation

jonesG

VB2005 code:


For Each FNT In FontFamily.Families

ComboBox1.Items.Add(FNT.Name)

Next



This will loop thru and display all of the Fonts on your system. But, not
True Type Fonts.

james
 
Jonesgj said:
How would I return a list of available fonts. I'm writing a simple word
processor, and have got the font dialog working, but wanted to create a
toolbar dropdown with a list of fonts in, instead.

\\\
Imports System.Drawing
..
..
..
For Each fntfam As FontFamily In FontFamily.Families
Console.WriteLine(fntfam.Name)
Next fntfam
///

<URL:http://dotnet.mvps.org/dotnet/samples/controls/#FontList>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top