#include <GUIConstantsEx.au3>
#include <WinAPI.au3>
#include <FontConstants.au3>
#include <WindowsConstants.au3>

Example()

Func Example()
	Local $hGUI = GUICreate("_WinAPI_GetTextMetrics")
	GUISetState()

	Local $hDC = _WinAPI_GetDC($hGUI)
	Local $hFont = _WinAPI_CreateFont(50, 0, 0, 0, 400, False, False, False, $DEFAULT_CHARSET, _
			$OUT_DEFAULT_PRECIS, $CLIP_DEFAULT_PRECIS, $DEFAULT_QUALITY, 0, 'Arial')
	Local $hOldFont = _WinAPI_SelectObject($hDC, $hFont)

	Local $tTxtMtr = _WinAPI_GetTextMetrics($hDC)
	_WinAPI_SelectObject($hDC, $hOldFont)
	_WinAPI_DeleteObject($hFont)
	_WinAPI_ReleaseDC(0, $hDC)

	MsgBox(0, "Сообщение", 'Структура шрифта hDC:' & @LF & @LF & _
			'tmHeight = ' & DllStructGetData($tTxtMtr, 1) & @LF & _
			'tmAscent = ' & DllStructGetData($tTxtMtr, 2) & @LF & _
			'tmDescent = ' & DllStructGetData($tTxtMtr, 3) & @LF & _
			'tmInternalLeading = ' & DllStructGetData($tTxtMtr, 4) & @LF & _
			'tmExternalLeading = ' & DllStructGetData($tTxtMtr, 5) & @LF & _
			'tmAveCharWidth = ' & DllStructGetData($tTxtMtr, 6) & @LF & _
			'tmMaxCharWidth = ' & DllStructGetData($tTxtMtr, 7) & @LF & _
			'tmWeight = ' & DllStructGetData($tTxtMtr, 8) & @LF & _
			'tmOverhang = ' & DllStructGetData($tTxtMtr, 9) & @LF & _
			'tmDigitizedAspectX = ' & DllStructGetData($tTxtMtr, 10) & @LF & _
			'tmFirstChar = ' & DllStructGetData($tTxtMtr, 11) & @LF & _
			'tmLastChar = ' & DllStructGetData($tTxtMtr, 12) & @LF & _
			'tmDefaultChar = ' & DllStructGetData($tTxtMtr, 13) & @LF & _
			'tmBreakChar = ' & DllStructGetData($tTxtMtr, 14) & @LF & _
			'tmItalic = ' & DllStructGetData($tTxtMtr, 15) & @LF & _
			'tmUnderlined = ' & DllStructGetData($tTxtMtr, 16) & @LF & _
			'tmStruckOut = ' & DllStructGetData($tTxtMtr, 17) & @LF & _
			'tmPitchAndFamily = ' & DllStructGetData($tTxtMtr, 18) & @LF & _
			'tmCharSet = ' & DllStructGetData($tTxtMtr, 19), 0, $hGUI)
	Do
	Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc   ;==>Example