What I mean by this is using the information I have available on the language choice of my user and their operating system, I want to display a font list in my web application where all the fonts work for the likely characters/symbols to be used.
So, on a Mac, I don’t want to display Windows specific fonts. For a Thai language user, I don’t want to display font that don’t have Thai symbols. If nothing exists in JavaScript, or the information isn’t available on the client side to determine such sets, does anyone know of a server-side solution to this, in any technology?
The best you can do is specify multiple fonts and allow the system to automatically go down the list until it finds one it has. There are no hooks in JavaScript for detecting fonts on a client machine.
That being said, there is a slightly painful way to detect fonts – put some text in a SPAN with that font and measure the resulting width of the SPAN. A known font will have a known width, as described in this article.