Jump to content

List of fonts


Recommended Posts

How can I get a list of the names of the fonts on a computer? Thanks in advance!

If you just want to see them yourself then just goto Control Panel>Fonts or C:\Windows\Fonts

If your trying to get AutoIt to get them Im not sure what the commands are but I know the cmd commands are

cd C:\Windows\Fonts

dir

Link to comment
Share on other sites

Like this:

#include <file.au3>
#include <array.au3>

Dim $s_FontList = _FileListToArray(@WindowsDir & "\Fonts\","*.ttf")

_ArrayDelete($s_FontList,0)

_ArrayDisplay($s_FontList,"Currently " & UBound($s_FontList) & " Fonts Available on this Machine:")

- The Kandie Man ;-)

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Link to comment
Share on other sites

Like this:

#include <file.au3>
#include <array.au3>

Dim $s_FontList = _FileListToArray(@WindowsDir & "\Fonts\","*.ttf")

_ArrayDelete($s_FontList,0)

_ArrayDisplay($s_FontList,"Currently " & UBound($s_FontList) & " Fonts Available on this Machine:")

- The Kandie Man ;-)

Thanks!
Link to comment
Share on other sites

  • 4 weeks later...

When I install fonts, I install shortcuts (my fonts collection lives in a different folder altogether)

This listing method would miss those. It also won't give you their proper names.

If it's just to let a user choose a font, checkout _ChooseFont() in Includes/Misc.au3

If you simply want a list, see..

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts

;o)

(or

nothing is foolproof to the sufficiently talented fool..

Link to comment
Share on other sites

  • 1 month later...

hi there !

this is interesting. but both methods (filefind and registry) do not return the font name like it has to be used in guisetfont() and the way _choosefont() does. how can one read out this special font description for a combo box or something like that ?

thx j.

Edited by jennico2

My contributions:Universal translator with national keyboards and Unicode support.Unicode editor with national keyboards and editing features.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...