This function initialises the font selector. If <no_fonts> is 0, vst_load_fonts() is called with <vdi_handle>. Otherwise an assumption is made that <no_fonts> is the number of all fonts available via <vdi_handle>, i.e. the number of all system fonts (work_out[10] for v_opnvwk()/vq_extnd()) plus the number of fonts loaded in later (return value of vst_load_fonts()).
Declaration: FNT_DIALOG *fnts_create( WORD vdi_handle, WORD no_fonts, WORD font_flags, WORD dialog_flags, BYTE *sample, BYTE *opt_button ); Call: fnt_dialog = fnts_create( vdi_handle, 0, 0xf, "The quick brown..." ); Variable Argument Meaning Inputs: contrl[0] 180 fnts_create contrl[1] 4 Entries in intin contrl[3] 2 Entries in addrin intin[0] vdi_handle Handle of the workstation to be used intin[1] no_fonts Number of available fonts or 0, if vst_load_fonts() is to be called intin[2] font_flags Type of fonts to be displayed intin[3] dialog_flags Appearance of the dialog addrin[0] sample Pointer to string for the sample text addrin[1] opt_button Pointer to string for optional button or 0L Outputs: contrl[2] 0 Entries in intout contrl[4] 1 Entries in addrout addrout[0] fnt_dialog Pointer to management structure Description of <font_flags>: #define FNTS_BTMP 1 /* Display bitmap fonts */ #define FNTS_OUTL 2 /* Display vector fonts */ #define FNTS_MONO 4 /* Display mono-spaced fonts */ #define FNTS_PROP 8 /* Display proportional fonts */ Description of <dialog_flags>: #define FNTS_3D 1 /* Display selector in 3D-look */
Note: Depending on system configuration, this function may well take 1 second (possibly even more), so it should be called at program start and not just immediately before displaying the font selector.
Please note: The font selector alters the attributes of the workstation described by <vdi_handle>. If one wants to use the workstation passed with fnts_create() also for other purposes, the attributes have to be set first each time, as they may have been altered meantime by the font selector.