6

Possible Duplicate:
list every font a user's browser can display

I am developing a application where user can select font-family using select box. but I do not know how to get supported font family from a browser.

Is it possible to get list of font-family supported by browser?

If yes how?

Community
  • 1
  • 1
Anoop
  • 23,044
  • 10
  • 62
  • 76
  • 1
    There is no really *good* way to do this. The best I can see is [list every font a user's browser can display](http://stackoverflow.com/questions/3368837/list-every-font-a-users-browser-can-display) – Pekka Dec 02 '11 at 21:26

2 Answers2

1

I suggest using the fonts that you want, rather than limiting yourself to the crossection of fonts supported by all browsers:

http://code.google.com/apis/webfonts/docs/getting_started.html#Quick_Start

Mikhail
  • 8,692
  • 8
  • 56
  • 82
-1

Modernizr is a great tool JS library for detecting the features the current browser supports. There is a section in there dedicated to font-family support and detection. That would be a good place to start.

arb
  • 7,753
  • 7
  • 31
  • 66
  • 1
    I don't think this is what the OP means. Modernizr can detect `font-face` support but that has nothing to do with the list of installed fonts on the client machine – Pekka Dec 02 '11 at 21:38
  • It sounds like he just wants to see if the selected font is support in the users current browser. "but I do not know how to get supported font family from a browser." – arb Dec 02 '11 at 21:40
  • "get list of font-family supported by browser" doesn't support that IMO – Pekka Dec 02 '11 at 21:41
  • So that it can be compared with that the user has selected. Not just to have a list, I'm assuming. – arb Dec 02 '11 at 21:42
  • But Modernizr can't help with that, is I think Pekka's point. – Pointy Dec 02 '11 at 21:45