With ADD USER FONTS a program can add its own user fonts to those displayed by the font selector. The IDs of these fonts must be higher than 65535. In addition the pointer to a display function must be entered into the structure element <display>.
Declaration: WORD fnts_add( FNT_DIALOG *fnt_dialog, FNTS_ITEM *user_fonts ); Call: ret = WORD fnts_add( fnt_dialog, user_fonts ); Variable Argument Meaning Inputs: contrl[0] 185 fnts_set contrl[1] 1 Entries in intin contrl[3] 2 Entries in addrin intin[0] 0 fnts_add addrin[0] fnt_dialog Pointer to management structure addrin[1] user_fonts Pointer to user fonts Outputs: contrl[2] 1 Entries in intout contrl[4] 0 Entries in addrout intout[0] ret 0: Error 1: All OK Declaration of FNTS_ITEM: typedef struct _fnts_item { struct _fnts_item *next; /* Pointer to the next font or 0L (end of the list) */ UTXT_FN display; /* Pointer to the display function for the user fonts */ LONG id; /* Font ID, >= 65536 for user fonts */ WORD index; /* Must be 0, as not a VDI font */ BYTE mono; /* Flag for mono-spaced font */ BYTE outline; /* Flag for vector font */ WORD npts; /* Number of predefined point sizes */ BYTE *full_name; /* Pointer to the complete name */ BYTE *family_name; /* Pointer to the family name */ BYTE *style_name; /* Pointer to the style name */ BYTE *pts; /* Pointer to field with point sizes */ LONG reserved[4]; /* Reserved, must be 0 */ } FNTS_ITEM; typedef void (cdecl *UTXT_FN)( WORD x, WORD y, WORD *clip_rect, LONG id, LONG pt, LONG ratio, BYTE *string );