fixed width font question

Ken Ray kray at
Sun Apr 13 02:10:05 EDT 2008

On 4/12/08 9:04 PM, "Josh Mellicker" <josh at> wrote:

> You mean more straightforward than putting a string of i's in a field,
> getting the formattedwidth, then a string of m's and seeing if the
> formattedwidth matches?  :-)
> On Jan 12, 2008, at 4:09 PM, Mark Swindell wrote:
>> Is there a straightforward way to return a list of active fonts on a
>> user's computer which are of fixed width?

Well, on a Mac, you can execute this AppleScript and parse the result (at
least under Leopard; haven't tried it with Tiger):

tell application "Font Book"
    get the name of the typefaces of font collection "Fixed Width"
end tell

But (a) you have to wait for Font Book to load before you get your result,
and (b) you end up with Font Book still open, requiring you to quit the
application. To do this in one go, you can do this:

tell application "Font Book"
    set tNames to the name of the typefaces of font collection "Fixed Width"
    get tNames
end tell

There's a way to do it in Windows I've found (querying EnumFontFamiliesEx
for those who care), but it seems to require a DLL to be created and can't
be called directly from VB Script AFAICT.

Ken Ray
Sons of Thunder Software, Inc.
Email: kray at
Web Site:

More information about the Use-livecode mailing list