Back to Devexpress

dxGetFontHeightForDefaultDPI(Integer,Integer) Method

vcl-dxdpiawareutils-dot-dxgetfontheightfordefaultdpi-x28-6a0f6ceb-x29.md

latest1.4 KB
Original Source

dxGetFontHeightForDefaultDPI(Integer,Integer) Method

Returns the font pixel height for the specified font size at the specified monitor DPI.

Declaration

delphi
function dxGetFontHeightForDefaultDPI(AFontSize: Integer; ADesignDPI: Integer = dxDefaultDPI): Integer;

Parameters

NameTypeDescription
AFontSizeInteger

The font size.

| | ADesignDPI | Integer |

The target monitor DPI.

|

Returns

TypeDescription
Integer

Returns the height in pixels based on the AFontSize parameter value.

|

Remarks

The default monitor DPI depends on the current Windows API implementation, and can be different for applications running under different operating systems. Call this global function to obtain the pixel height corresponding to the font size passed as the AFontSize parameter at the default monitor DPI.

See Also

dxDPIAwareUtils Unit