I want to allow users to select a font using a dropdown box. As every body has different fonts installed, how do I read the available fonts. I know this will be a very long list, but will not be used very often. I will store the selected font and size on a database for later use.
I think that you need to stick to common fonts because you can't find out what fonts they may have installed, and if you could then you might have a list of too many fonts, some of which may not display on a web page. For example, on my computer I have hundreds of fonts installed, so you can imagine the trouble that you can get into.
As for loading a font to be used in a web page, that's no problem, but initially you don't need to use a database at all if you can write the font name to a cookie, which may be better because the user gets the same font loaded when they return.
So all you need to do is create a dropdown in a form with some font names listed. Use a submit button or an onchange statement to submit the new info to the same page for the page to load the font.
I didn't test this code, but it should give the idea.