Skip to content

get_fontGetFontGetFontget_fontT_get_font🔗

Short description🔗

get_fontGetFontGetFontget_fontT_get_font — Get the current font.

Signature🔗

get_font( window WindowHandle, out string Font )void GetFont( const HTuple& WindowHandle, HTuple* Font )static void HOperatorSet.GetFont( HTuple windowHandle, out HTuple font )def get_font( window_handle: HHandle ) -> str

Herror T_get_font( const Htuple WindowHandle, Htuple* Font )

HString HWindow::GetFont( ) const

string HWindow.GetFont( )

Description🔗

get_fontGetFont queries the name of the font used in the output window WindowHandlewindowHandlewindow_handle. The font is used by the operators write_stringWriteString, read_stringReadString etc. The font is set by the operator set_fontSetFont. Text windows as well as windows for image display use fonts. Both types of windows have a default font that can be modified with set_system('default_font',Font) prior to opening the window. A list of all available fonts can be obtained using query_fontQueryFont.

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 → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Name of the current font.

Example🔗

(HDevelop)

get_font(WindowHandle,CurrentFont)
set_font(WindowHandle,MyFont)
write_string(WindowHandle,['The name of my Font is:',Myfont])
new_line(WindowHandle)
set_font(WindowHandle,CurrentFont)
(C)
T_get_font(WindowHandle,&CurrentFont)\;
T_set_font(WindowHandle,MyFont)\;
sprintf(buf,"The name of my Font is: %s ",get_s(Myfont,0)\;
create_tuple_s(&String,buf)\;
T_write_string(WindowHandle,String)\;
T_new_line(WindowHandle)\;
T_set_font(WindowHandle,CurrentFont)\;

Result🔗

get_fontGetFont returns 2 (H_MSG_TRUE).

Combinations with other operators🔗

Combinations

Possible predecessors

open_windowOpenWindow, query_fontQueryFont

Possible successors

set_fontSetFont

See also

set_fontSetFont, query_fontQueryFont, open_windowOpenWindow, set_systemSetSystem

Module🔗

Foundation