Is there a way to get a list of all fonts?

Blitz3D Forums/Blitz3D Beginners Area/Is there a way to get a list of all fonts?

syfax(Posted 2003) [#1]
I'm not really sure which forum this should be in, but here goes:

For an obscure reason, I want to have all fonts loaded into an array. eg I want to be able to do Setfont(Font(i))

To get all fonts into Font() I tried loading them based on their filename. Unfortunately, it wants their "font name" which apparently isn't the same thing. For example:
Loadfont("Times New Roman") works fine.
Loadfont("Times") doesn't.

Where can I get a list of all the font names?

On the off-chance anyone has a clue what I'm talking about, thanks in advance :)


keyboard(Posted 2003) [#2]
I'm interested too...

I think people who write software that enumerates the fonts available on the system access the Windows API...

Also, font information is contained in the registry, under this key in Win98:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts

I know this is not much help, but hopefully someone who knows more will see your post :)


Beaker(Posted 2003) [#3]
Interestingly it's not under that key on my machine. It's under:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Fonts

On Win 98SE as well! Lord knows why.


keyboard(Posted 2003) [#4]
oops
I stand corrected
thanks MasterBeaker


syfax(Posted 2003) [#5]
Thanks guys, mine's in the same place as Masterbeaker's using 98 version 4.1

I exported them to a text file in regedit and I made Blitz convert them into a workable font list. I can at least get the program working with this.

However whenever I add new fonts, I'd have to export again. It'd also only work on this computer. Is there anyway I can access the registry through Blitz?

Thanks, God knows what I'd do without this forum


Perturbatio(Posted 2003) [#6]
there's this DLL, but I believe it has issues readingat the moment.

*EDIT*

or maybe this one?


Beaker(Posted 2003) [#7]
They are the same one.