get_fontT_get_fontGetFontGetFontget_font (Operator)

Name

get_fontT_get_fontGetFontGetFontget_font — Get the current font.

Signature

get_font( : : WindowHandle : Font)

Herror T_get_font(const Htuple WindowHandle, Htuple* Font)

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

HString HWindow::GetFont() const

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

string HWindow.GetFont()

def get_font(window_handle: HHandle) -> str

Description

get_fontget_fontGetFontGetFontGetFontget_font queries the name of the font used in the output window WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle. The font is used by the operators write_stringwrite_stringWriteStringWriteStringWriteStringwrite_string, read_stringread_stringReadStringReadStringReadStringread_string etc. The font is set by the operator set_fontset_fontSetFontSetFontSetFontset_font. 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)set_system("default_font",Font)SetSystem("default_font",Font)SetSystem("default_font",Font)SetSystem("default_font",Font)set_system("default_font",Font) prior to opening the window. A list of all available fonts can be obtained using query_fontquery_fontQueryFontQueryFontQueryFontquery_font.

Execution Information

Parameters

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

Window handle.

FontFontFontFontfontfont (output_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (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)

Example (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);

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)

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)

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)

Result

get_fontget_fontGetFontGetFontGetFontget_font returns 2 (H_MSG_TRUE).

Possible Predecessors

open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window, query_fontquery_fontQueryFontQueryFontQueryFontquery_font

Possible Successors

set_fontset_fontSetFontSetFontSetFontset_font

See also

set_fontset_fontSetFontSetFontSetFontset_font, query_fontquery_fontQueryFontQueryFontQueryFontquery_font, open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window, set_systemset_systemSetSystemSetSystemSetSystemset_system

Module

Foundation