Skip to content

get_font_extentsGetFontExtentsGetFontExtentsget_font_extentsT_get_font_extents🔗

Short description🔗

get_font_extentsGetFontExtentsGetFontExtentsget_font_extentsT_get_font_extents — Get the maximum size of all characters of a font.

Signature🔗

get_font_extents( window WindowHandle, out extent.y MaxAscent, out extent.y MaxDescent, out extent.x MaxWidth, out extent.y MaxHeight )void GetFontExtents( const HTuple& WindowHandle, HTuple* MaxAscent, HTuple* MaxDescent, HTuple* MaxWidth, HTuple* MaxHeight )static void HOperatorSet.GetFontExtents( HTuple windowHandle, out HTuple maxAscent, out HTuple maxDescent, out HTuple maxWidth, out HTuple maxHeight )def get_font_extents( window_handle: HHandle ) -> Tuple[Union[int, float], Union[int, float], Union[int, float], Union[int, float]]

Herror T_get_font_extents( const Htuple WindowHandle, Htuple* MaxAscent, Htuple* MaxDescent, Htuple* MaxWidth, Htuple* MaxHeight )

HTuple HWindow::GetFontExtents( HTuple* MaxDescent, HTuple* MaxWidth, HTuple* MaxHeight ) const

Hlong HWindow::GetFontExtents( Hlong* MaxDescent, Hlong* MaxWidth, Hlong* MaxHeight ) const

HTuple HWindow.GetFontExtents( out HTuple maxDescent, out HTuple maxWidth, out HTuple maxHeight )

int HWindow.GetFontExtents( out int maxDescent, out int maxWidth, out int maxHeight )

Description🔗

get_font_extentsGetFontExtents queries the maximum width (MaxWidthmaxWidthmax_width), height (MaxHeightmaxHeightmax_height), and extension above and below the baseline (MaxAscentmaxAscentmax_ascent and MaxDescentmaxDescentmax_descent, respectively) of the font that is currently set for the window WindowHandlewindowHandlewindow_handle. The sizes are measured in pixels.

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.

MaxAscentmaxAscentmax_ascent (output_control) extent.y → (integer / real)HTuple (Hlong / double)HTuple (int / long / double)Union[int, float]Htuple (Hlong / double)

Maximum height above baseline.

MaxDescentmaxDescentmax_descent (output_control) extent.y → (integer / real)HTuple (Hlong / double)HTuple (int / long / double)Union[int, float]Htuple (Hlong / double)

Maximum extension below baseline.

MaxWidthmaxWidthmax_width (output_control) extent.x → (integer / real)HTuple (Hlong / double)HTuple (int / long / double)Union[int, float]Htuple (Hlong / double)

Maximum character width.

MaxHeightmaxHeightmax_height (output_control) extent.y → (integer / real)HTuple (Hlong / double)HTuple (int / long / double)Union[int, float]Htuple (Hlong / double)

Maximum character height.

Result🔗

get_font_extentsGetFontExtents returns 2 (H_MSG_TRUE) if the window is valid. Otherwise an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

open_windowOpenWindow, set_fontSetFont

Possible successors

set_tpositionSetTposition, write_stringWriteString, read_stringReadString, read_charReadChar

See also

get_string_extentsGetStringExtents, set_tpositionSetTposition, set_fontSetFont

Module🔗

Foundation