Skip to content

Enumerate_Fonts - DfBaseWindow

Provides a mechanism to obtain a list of all fonts

Type: Procedure

Parameters

Parameter Type Description
sTypeFace String (Optional) type face to enumerate fonts for. If blank, all fontnames are enumerated.

Syntax

Procedure Enumerate_Fonts String sTypeFace

Call Example

Send Enumerate_Fonts sTypeFace

Description

Enumerate_Fonts enables the program to obtain a list of the fonts that are available on the current system for a passed sTypeface.For each font found, the function User_FontName will be called passing the font name and height. If this function returns non-zero, the enumeration will be halted. You must provide the User_FontName function.

Object oFontsCombo is a ComboForm
    Set Size to 13 100
    Set Location to 10 10
    Set Label to "Fonts"

    Function User_FontName String sName Integer iHeight Returns Integer
        Send Combo_Add_Item sName
        Function_Return 0 
    End_Function

    Procedure Combo_Fill_List
        Send Enumerate_Fonts ""
    End_Procedure

End_Object