ClassesClasses | | Operators

get_fontget_fontGetFontGetFont (Operator)

Name

get_fontget_fontGetFontGetFont — Get the current font.

Signature

get_font( : : WindowHandle : Font)

Herror get_font(const Hlong WindowHandle, char* 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()

Description

get_fontget_fontGetFontGetFontGetFont queries the name of the font used in the output window WindowHandleWindowHandleWindowHandleWindowHandlewindowHandle. The font is used by the operators write_stringwrite_stringWriteStringWriteStringWriteString, read_stringread_stringReadStringReadStringReadString etc. The font is set by the operator set_fontset_fontSetFontSetFontSetFont. 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) prior to opening the window. A list of all available fonts can be obtained using query_fontquery_fontQueryFontQueryFontQueryFont.

Execution Information

Parameters

WindowHandleWindowHandleWindowHandleWindowHandlewindowHandle (input_control)  window HWindow, HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

Window handle.

FontFontFontFontfont (output_control)  string HTupleHTupleHtuple (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)

get_font(WindowHandle,&CurrentFont) ;
set_font(WindowHandle,MyFont) ;
create_tuple(&String,1) ;
sprintf(buf,"The name of my Font is: %s ",Myfont) ;
set_s(String,buf,0) ;
T_write_string(TupleWindowHandle,String) ;
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)

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_fontGetFontGetFontGetFont returns 2 (H_MSG_TRUE).

Possible Predecessors

open_windowopen_windowOpenWindowOpenWindowOpenWindow, query_fontquery_fontQueryFontQueryFontQueryFont

Possible Successors

set_fontset_fontSetFontSetFontSetFont

See also

set_fontset_fontSetFontSetFontSetFont, query_fontquery_fontQueryFontQueryFontQueryFont, open_windowopen_windowOpenWindowOpenWindowOpenWindow, set_systemset_systemSetSystemSetSystemSetSystem

Module

Foundation


ClassesClasses | | Operators