Topic : TOS - The Operating System Author : Version : tos.hyp (December 19, 2008) Subject : Programmieren/Atari Nodes : 3010 Index Size : 93790 HCP-Version : 5 Compiled on : Atari @charset : atarist @lang : @default : Title @help : @options : +g -i -s +x +zz -t4 @width : 70 View Ref-File8.3.17 x_appl_font TOS Name: »Change font and window borders« - (Geneva) Opcode: 28929 Syntax: int16_t x_appl_font( int16_t getset, int16_t zero, XFONTINFO *info ); Description: The call x_appl_font changes the characteristics of the large font used by Geneva, and also the window widget borders. This function gives one control over what font is used to display characters in the menu bar, dialogs, etc. When Geneva first runs, it checks to see if the font ID saved in GENEVA.CNF is anything other than 1 (for a system font). If so, and GDOS is present, it loads all available fonts, and uses the correct font. If the particular font is not available, it reverts to the system font. Regardless of the font's availability, the closest point size to the one specified is used. The window widgets will have a width which is equal to the width of one character in the font, plus the value specified by the user. A similar calculation is used for the widget height. When any element in the structure pointed to by info is -2, the default value for that element (as though there had been no GENEVA.CNF file when Geneva loaded) is used; in the case of a getset value of zero (get), this default value is returned in the info structure. When getset is 1 and any element is -1, that element will cause Geneva to ignore the setting, leaving the old value in tact. Setting these values will have no immediate effect. The GENEVA.CNF file must be re-saved, and Geneva must be restarted before a change can be noticed. This example: XFONTINFO info = { -2, -2, -2, -2 }; x_appl_font( 0, 0, &info ); /* Get default values */ x_appl_font( 1, 0, &info ); /* Set to these values */ Is the same as: XFONTINFO info = { -2, -2, -2, -2 }; x_appl_font( 1, 0, &info ); /* Set to default values */ Set it to something else: XFONTINFO info = { 1, /* Select the system font */ 10, /* 10 point (8 x 16) */ 5, /* Widget width = 8+5 pixels */ 4 }; /* Widget height = 16+4 pixels */ x_appl_font( 1, 0, &info ); Cautions: . Only Monospaced fonts should be used. . While Geneva will work properly with any size font, some programs may not function properly with larger or smaller fonts. This is especially true when it comes to fonts which are more than 8 pixels wide. The parameter zero is reserved for future expansion. Must always be 0. Return value: Return value of the function is unknown at present. Availability: The function is available only under Geneva. Group: Application library See Also: Binding