Set the font used for text output.
::set_font sets the font for the output window. The font is used by the operators ::write_string, ::read_string etc. Text windows as well as windows for image display use fonts. A default font is assigned when a window is opened. This font can be changed with ::set_font. On UNIX systems all available fonts can be queried with ::query_font. The default font can be modified with ::set_system('default_font',Fontname). Fonts are not used for file operations.
The syntax for the specification of a font (in Font) differs for UNIX and Windows NT environments: In Windows NT a string with the following components is used: -FontName-Height-Width-Italic-Underlined-Strikeout-[Bold-]
where ``Italic'', ``Underlined'', ``Strikeout'' and ``Bold'' can take the values 1 and 0 to activate or deactivate the corresponding feature. Please refer to the Windows NT documentation for a detailed discussion.
For different machines the available fonts may differ a lot. Therefore it is suggested to use wildcards, tables of fonts and/or the operator ::query_font.
|
WindowHandle (input_control) |
window -> HTuple.long |
| Window identifier. | |
|
Font (input_control) |
string -> HTuple.char * |
| Name of new font. | |
// UNIX set_font(WindowHandle,"-*-courier-*-*-*-*-18-*-*-*-*-*-*-*") ; // Windows NT set_font(WindowHandle,"-Arial-18-*-*-*-*-") ; write_string(WindowHandle,"Text with Font size of 18 pixels") ; new_line(WindowHandle) ; set_font(WindowHandle,'-Arial-18-*-*-*-*-1-') ; write_string(WindowHandle,'Text with Font size of 18 pixels and bold') ; new_line(WindowHandle) ;
::set_font returns H_MSG_TRUE if the font name is correct. Otherwise an exception handling is raised.
::open_window, ::open_textwindow
::get_font, ::query_font, ::open_textwindow, ::open_window
System