Fonts: Changing Fonts

The system font is displayed in your applications unless an alternative font is specified in a 'vgd' file. The formats for 'vgd' files differ between the WinNt and Win95/98 operating systems and example files can be obtained from DataAspects. However, the user can create and edit their own 'vgd' files using a function called Winprop():

  1. To enable the user to change fonts, add a menu item called 'Font' under File on the menu bar and create this trigger: winprop();.
  2. To create a 'vgd' file, run the application and click 'Menu/File/Fonts' on the menu bar to open the Window Defaults dialog box. Change the font type and size. Changes to the fonts and sizes are displayed immediately. Experiment with the fonts until you are satisfied with the display and then save your settings to 'TRIMhome\lib\myfile.vgd'.
  3. To modify a 'vgd' file, click 'Menu/File/Fonts' to open the Window Defaults dialog box. Then click 'Menu/File/Open' and display the 'vgd' files on your system ( i.e. TRIMhome\lib\*.vgd. After selecting a 'vgd' file, open, edit and save it.

Note that different procedures are used to set fonts for different configurations.

Apply a Font to all Applications on a Thin Client:

To apply a font to all applications run on a thin client, add the following line to the thin client initialization file (i.e. C:\daspects\lib\myfile.ini):

default_file       c:\trifox\lib\myfile.vgd
Call myfile.ini from the command line as follows:
C:\daspects\bin\dvslave.exe -iC:\daspects\lib\myfile.ini
If 'default_file' is not specified in the 'ini' file, then the thin client looks for the environment variable 'GUI_DEFAULT_FILE':
GUI_DEFAULT_FILE=c:\trifox\lib\myfile.vgd
Finally, if 'GUI_DEFAULT_FILE' is not specified, a default setting is used.

Apply a Font to all Applications on a Fat Client:

When a fat client starts, it looks for an environmental variable called 'GUI_DEFAULT_FILE'. If this variable is not found, a default setting is used.

Apply a Font to Single Application on a Client:

The font may be set in a script before calling the application as shown in the following pl program:

{
/*___________________________________________________________________________
FONT.PL
The GUI_DEFAULT_FILE environment variable is read as soon as dvrun starts.
To set this variable for an individual application requires this wrapper 
TRIM/PL script.
   parm.0:  filename for the VGD file
   parm.1:  name of the .run file to execute.

   compile: trimgen font.pl -a
   run: dvrun font -p c:\trifox\lib\1024x768_Win98.vgd cc_track
______________________________________________________________________________*/
putenv("GUI_DEFAULT_FILE="^^parm.0);                      /* set font         */
call(parm.1);                                             /* open application */
}
Apply a Font to a Single Window

To change the font for a single window, run either fat or thin, call winprop(vgd_file). The call could be made at the top of the window trigger. For thin clients, put the 'vgd' file on the server in TRIMhome/cis and use the get_file() function to copy it to the client. (i.e. winprop(getfile("etcis",g.cis_dir,"ship.vgd","a",""));