Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2006
    Location
    UK SouthWest
    Posts
    420

    enumerate the available fonts

    Does anyone know how to enumerate the available fonts in windows? Im sure ive seen this somewhere before. Thanks.

  2. #2
    Join Date
    Nov 2006
    Location
    Quebec, Canada.
    Posts
    432
    You have to enumerate the files in
    _SystemFolder.."\\Fonts
    I don't remember if it's the right name for _SystemFolder, but I think so. However I don't remember which action is for listing the files in a folder.

    You could always try to get this information from the registry, but I don't know enough to help you more about it.

  3. #3
    Join Date
    Jul 2002
    Location
    Just South of Reality
    Posts
    778
    hth - I'm not really sure if this is what you're looking for.

    PHP Code:
    result File.Find("C:\\Windows\\Fonts\\""*.ttf"falsefalsenilnil);
    for 
    1do
        
    Dialog.Message("Font: """..result[x], MB_OK)
    end 
    I'm just displaying the first 5 in this example.

  4. #4
    Join Date
    Jun 2006
    Location
    UK SouthWest
    Posts
    420
    ahh, of course. *slaps head*
    thanks.

  5. #5
    Join Date
    Nov 2006
    Location
    Quebec, Canada.
    Posts
    432
    ...but all the fonts are not TTF. There's at least OTF, but there's another if I recall correctly.

  6. #6
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    You could just use "*.*" instead of the hard-coding the extention. But make sure to error check after you get that table of index, values!
    Intrigued

  7. #7
    Join Date
    Oct 2005
    Location
    American Dubai
    Posts
    629
    Also,
    I think it might be safer to use

    Shell.GetFolder(SHF_FONTS) instead of "C:\\Windows\\Fonts\\"

    ( if your program will be distributed )

    Quote Originally Posted by holtgrewe View Post
    hth - I'm not really sure if this is what you're looking for.

    PHP Code:
    result File.Find("C:\\Windows\\Fonts\\""*.ttf"falsefalsenilnil);
    for 
    1do
        
    Dialog.Message("Font: """..result[x], MB_OK)
    end 
    I'm just displaying the first 5 in this example.

Similar Threads

  1. Display, add & remove fonts with APMS6 (How to?)
    By ishopper in forum AutoPlay Media Studio 6.0
    Replies: 7
    Last Post: 04-05-2006, 11:55 AM
  2. Fonts that don't embed
    By dthompson16 in forum AutoPlay Media Studio 5.0
    Replies: 0
    Last Post: 10-24-2004, 01:16 PM
  3. INFO: Using Non-TrueType Fonts
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-21-2002, 11:26 AM
  4. PROBLEM: Setup Hangs at Registering Fonts Stage
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 09-19-2002, 09:38 AM
  5. INFO: Distributing Fonts with an Application
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 09-18-2002, 10:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts