How can I get the list of available fonts on a system in Ruby? It seems
like there should be a built-in function that does it.
Yahoo! oneSearch: Finally, mobile search that gives answers, not web
links.
How can I get the list of available fonts on a system in Ruby? It seems
like there should be a built-in function that does it.
Yahoo! oneSearch: Finally, mobile search that gives answers, not web
links.
Many stylesheets contain a list of fonts, in order of descending
preference. Just make sure that the last font is guaranteed to be
available, Verdana for example.
body
{
font-family: Helvetica, Verdana;
}
If you really want to offer a list of fonts to your users, it doesn’t
sound pleasant. You need to use flash, and then retrieve the list from
here using javascript. This link looks useful:
http://nevermore.pri.ee/2007/03/14/another-better-font-detection-using-javascript-flash/
Hope that helps.
Cheers,
Chris
Hmm. I guess probably need to phrase the question a little differently.
What I want to is get list of all the fonts on the system. This won’t be
for a stylesheet or anything, it’s just there for a lookup table. The
user won’t have contact with actual font - all I need is for them to be
able to select one from a list.
Will
Chris [email protected] wrote:
Many stylesheets contain a list of fonts, in order of descending
preference. Just make sure that the last font is guaranteed to be
available, Verdana for example.
body
{
font-family: Helvetica, Verdana;
}
If you really want to offer a list of fonts to your users, it doesn’t
sound pleasant. You need to use flash, and then retrieve the list from
here using javascript. This link looks useful:
http://nevermore.pri.ee/2007/03/14/another-better-font-detection-using-javascript-flash/
Hope that helps.
Cheers,
Chris
On Jul 5, 10:44 am, Will G. wrote:
How can I get the list of available fonts on a system in Ruby? It seems like there should be a built-in function that does it.
Yahoo! oneSearch: Finally, mobile search that gives answers, not web links.
Choose the right car based on your needs. Check out Yahoo! Autos new
Car Finder tool.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs