473,396 Members | 2,009 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Retrieving a list of available fonts on system.

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
Apr 20 '06 #1
3 1431

"Jonesgj" <a@b.com> wrote in message news:Ye********************@bt.com...
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



Apr 20 '06 #2
"Jonesgj" <a@b.com> schrieb:
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>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Apr 20 '06 #3
Thanks James and Hefried.

Best wishes

Jonesgj
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:eL**************@TK2MSFTNGP04.phx.gbl...
"Jonesgj" <a@b.com> schrieb:
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>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Apr 21 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: SeeBelow | last post by:
I'm learning Tkinter, from Grayson's book and some online sources. I don't know how to find out which color names and font names are available on my system. I'm using Windows 2000. I assume...
1
by: jusovsky | last post by:
Our font management tool, Suitcase, activates fonts dynamically by creating shortcuts in the Windows font folder. Using System.Drawing.Text.InstalledFontCollection to get the list of font families...
2
by: Lasse Edsvik | last post by:
Hello I was wondering if you guys could show me how to list all fonts using C#? those that is supported by gdi+ that is, im using gdi+ to apply text on a pic. TIA /Lasse
1
by: Atul | last post by:
Hi, I have installed a truetype font (.ttf) on a linux machne (SUSE linux 10, KDE) by copying it to my .fonts folder. I can use the font in all applications like open-office and firefox browser....
2
by: Nathan Sokalski | last post by:
I need to get a list of the available fonts as some type of collection or array. How can I do this? Thanks. -- Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/
24
by: Tony Girgenti | last post by:
Hello. Developing a Windows Form program in VS.NET VB, .NET Framework 1.1.4322 on a windows XP Pro, SP2. Before printing a document, i want to set the font to a font that is only available...
9
ADezii
by: ADezii | last post by:
One question which pops up frequently here at TheScripts is: 'How do I retrieve data from a Recordset once I've created it?' One very efficient, and not that often used approach, is the GetRows()...
7
by: clinisbut | last post by:
Hi I'm trying to write an app and don't know how to start. I'll have a selector with a list of true type fonts. Each font will represent a different set of chars. Example *arial-font...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.