Font Combobox

MasterMax1313

New Member
Messages
84
Reaction score
0
Points
0
Chances are, there is no easy way to do this, though I figured I'd post here and see if anyone has a novel approach.

What I'd like to do is allow a user to choose a font for their page, through the use of a combobox, javascript, and possibly PHP.

My question, is there some way to popluate the combobox with fonts that either a) the system supports, or b) that might be built in somewhere?

If I can find a novel approach, perhaps this will wind up on the tutorials forum.

Let me know what you think!
 

diabolo

Community Advocate
Community Support
Messages
1,682
Reaction score
32
Points
48
well here is the main thing with fonts, I am pretty sure that you can not embed fonts into your webpage, so then your range of fonts are limited.
http://www.ampsoft.net/webdesign-l/WindowsMacFonts.html
instead you might want to try 'font-families' so that the browser can chose which font it has, also you will have to hardcode the box, rather than pulling the infomation from somewhere
 

MasterMax1313

New Member
Messages
84
Reaction score
0
Points
0
I kind of figured that it is not possible to embed fonts into the website (though i wouldn't be surprised if there's some way to force a download of a font, as i think there are some security options in FF and IE that deal with font downloads). Anyway, the goal of this was to find out if there is a way to access a list of all installed fonts on a system (akin to C:/Windows/fonts), and I found out that there are some ways to do this with IE, but so far no luck with FF. The only solution I've come up with is writing a java applet and passing the data back to javascript to pop the combobox, or populating the combobox from the applet. I think you can use applets to access the file system, though it may have to be signed. At any rate this was more of an exploratory query, as I probably won't be able to add it to my site until version 2 or 3 (still have to get version 1 out :D)
 

deadimp

New Member
Messages
249
Reaction score
0
Points
0
I think the only practical solution would be the common fonts listed on that site.
What you might want to do is find yourself on open source browser-based WYSIWYG editor and see how they created their font selector. That could probably give you some ideas, and even some code to use.
 
Last edited:
Top