query_fontT_query_fontQueryFontQueryFontquery_font (Operator)

Name

query_fontT_query_fontQueryFontQueryFontquery_font — Query the available fonts.

Signature

query_font( : : WindowHandle : Font)

Herror T_query_font(const Htuple WindowHandle, Htuple* Font)

void QueryFont(const HTuple& WindowHandle, HTuple* Font)

HTuple HWindow::QueryFont() const

static void HOperatorSet.QueryFont(HTuple windowHandle, out HTuple font)

HTuple HWindow.QueryFont()

def query_font(window_handle: HHandle) -> Sequence[str]

Description

query_fontquery_fontQueryFontQueryFontQueryFontquery_font queries the fonts available for text output in the output window. They can be set with the operator set_fontset_fontSetFontSetFontSetFontset_font using the appropriate syntax. Fonts are used by the operators write_stringwrite_stringWriteStringWriteStringWriteStringwrite_string, read_charread_charReadCharReadCharReadCharread_char, read_stringread_stringReadStringReadStringReadStringread_string and new_linenew_lineNewLineNewLineNewLinenew_line.

Attention

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

Execution Information

Parameters

WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle (input_control)  window HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Window handle.

FontFontFontFontfontfont (output_control)  string-array HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Tuple with available font names.

Example (HDevelop)

open_window(0,0,-1,-1,'root','visible','',WindowHandle)
set_check('~text')
query_font(WindowHandle,Fontlist)
set_color(WindowHandle,'white')
for i:=0 to |Fontlist|-1 by 1
  set_display_font (WindowHandle,16,Fontlist[i],'true','false')
  write_string(WindowHandle,Fontlist[i])
  new_line(WindowHandle)
endfor

Result

query_fontquery_fontQueryFontQueryFontQueryFontquery_font returns 2 ( H_MSG_TRUE) .

Possible Predecessors

open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window

Possible Successors

set_fontset_fontSetFontSetFontSetFontset_font, write_stringwrite_stringWriteStringWriteStringWriteStringwrite_string, read_stringread_stringReadStringReadStringReadStringread_string, read_charread_charReadCharReadCharReadCharread_char

See also

set_fontset_fontSetFontSetFontSetFontset_font, write_stringwrite_stringWriteStringWriteStringWriteStringwrite_string, read_stringread_stringReadStringReadStringReadStringread_string, read_charread_charReadCharReadCharReadCharread_char, new_linenew_lineNewLineNewLineNewLinenew_line

Module

Foundation