Herror ::query_font (
    const HTuple &WindowHandle,
    HTuple *Font
)
HTuple HWindow::QueryFont (
    
) const

Query the available fonts.

::query_font queries the fonts available for text output in the output window. They can be set with the operator ::set_font. Fonts are used by the operators ::write_string, ::read_char, ::read_string and ::new_line.


Attention

For different machines the available fonts may differ a lot. Therefore ::query_font will return different fonts on different machines.


Parameters

WindowHandle (input_control)
window -> HTuple.long
Window identifier.

Font (output_control)
string-array -> HTuple.char *
Tupel with available font names.


Example
open_window(0,0,-1,-1,"root","visible","",&WindowHandle) ;
set_check("~text") ;
create_tuple(&Fontlist,1) ;
create_tuple(&String,1) ;
create_tuple(&WindowHandleTuple,1) ;
set_i(WindowHandleTuple,WindowHandle,0) ;
T_query_font(WindowHandleTuple,&Fontlist) ;
set_color(WindowHandle,"white") ;
for(i=0; i<length_tuple(Fontlist); i++) ;
{
  charstring = get_s(Fontlist,i) ;
  set_font(WindowHandle,charstring) ;
  set_s(String,charstring,0) ;
  T_write_string(WindowHandleTuple,String) ; 
  new_line(WindowHandle) ;
}

Result

::query_font returns H_MSG_TRUE.


Possible Predecessors

::open_window, ::open_textwindow


Possible Successors

::set_font, ::write_string, ::read_string, ::read_char


See also

::set_font, ::write_string, ::read_string, ::read_char, ::new_line


Module

System



Copyright © 1996-2002 MVTec Software GmbH