Skip to content

query_fontQueryFontQueryFontquery_fontT_query_font🔗

Short description🔗

query_fontQueryFontQueryFontquery_fontT_query_font — Query the available fonts.

Signature🔗

query_font( window WindowHandle, out string Font )void QueryFont( const HTuple& WindowHandle, HTuple* Font )static void HOperatorSet.QueryFont( HTuple windowHandle, out HTuple font )def query_font( window_handle: HHandle ) -> Sequence[str]

Herror T_query_font( const Htuple WindowHandle, Htuple* Font )

HTuple HWindow::QueryFont( ) const

HTuple HWindow.QueryFont( )

Description🔗

query_fontQueryFont queries the fonts available for text output in the output window. They can be set with the operator set_fontSetFont using the appropriate syntax. Fonts are used by the operators write_stringWriteString, read_charReadChar, read_stringReadString and new_lineNewLine.

Attention🔗

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

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

WindowHandlewindowHandlewindow_handle (input_control) window → (handle)HTuple (HHandle)HWindow, HTuple (IntPtr)HHandleHtuple (handle)

Window handle.

Fontfontfont (output_control) string-array → (string)HTuple (HString)HTuple (string)Sequence[str]Htuple (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_fontQueryFont returns 2 (H_MSG_TRUE).

Combinations with other operators🔗

Combinations

Possible predecessors

open_windowOpenWindow

Possible successors

set_fontSetFont, write_stringWriteString, read_stringReadString, read_charReadChar

See also

set_fontSetFont, write_stringWriteString, read_stringReadString, read_charReadChar, new_lineNewLine

Module🔗

Foundation