"convert" questions
Cubist at aol.com
Cubist at aol.com
Tue May 24 05:14:54 EDT 2005
sez brad at activadesign.com:
>I want to populate a pulldown menu with choices from the user's font
>menu. I'm sure there's a one-line command to do this (that's what I love
>about RR) but I can't find it.
Welcome aboard, and there is indeed a one-liner for what you want:
put the fontNames into button "FontMenu"
It is not necessarily a good idea to let it go at that, however. The
fontNames function is not the least bit discriminate; it will happily give you a
list of fonts which includes "Kaufmann Bold" and "Kaufmann" as separate entries,
and it also doesn't realize that "Zapf Dingbats" isn't a real text font.
Detecting dingbat fonts is highly problematic (and may not even be possible in the
first place!), but consolidating style-families into single entries should be
possible. Once you've got a handler that consolidates families, you can still
do what you want in a one-liner:
put MergedStyles (the fontNames) into button "FontMenu"
Hope this helps...
More information about the use-livecode
mailing list