faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

18 of 25 people (72%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

How do I get a list of fonts available on a user's computer?

Apr 4th, 2008 19:54
ha mo, Mark Szlazak, Jean-Bernard Valentaten, Deep Fried Mars, Colin Fraser, Joe Boland,


> Since this would be a security hole, there is no way to find out what 
> fonts are installed on a users computer
> If you want to use one very specific font and are not sure that 
> everybody has t installed, simply get a copy of the font on the 
> server of your webpage (or whereever you can access it via url) and 
> reference it through a CSS (please see CSS-manual for additional 
> info).
> Otherwise I do propose to use font-families like arial, sans-serif 
> and the likes.
I also want to find out what fonts are avalaible from a client. It is 
to enable users to print reports off in any font they have available 
from their browser. If anyone has any idea, please post.
Well, in that case I'd say you'll have to write an applet, since you 
cannot:
a) find out what fonts are on a users computer via JS
b) tell the JS print() method which font to use
Java on the other side can do that and is just perfect for such tasks.
HTH
---------
See "Identifying Installed Fonts" at:
       http://www.webreference.com/dhtml/column30/
Mark
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com