Back to Devexpress

dxGetFontHeight(Integer,TdxScaleFactor) Method

vcl-dxdpiawareutils-dot-dxgetfontheight-x28-b8de7833-x29.md

latest1.3 KB
Original Source

dxGetFontHeight(Integer,TdxScaleFactor) Method

Calculates the font pixel height from the specified font size for a target scale factor.

Declaration

delphi
function dxGetFontHeight(AFontSize: Integer; AScaleFactor: TdxScaleFactor): Integer;

Parameters

NameType
AFontSizeInteger
AScaleFactorTdxScaleFactor

Returns

Type
Integer

Remarks

Call this global function and pass the source font size as the AFontSize parameter to calculate the corresponding pixel height for the AScaleFactor target scale factor. The dxGetFontHeight function calls the dxGetFontHeightForDefaultDPI global function internally to calculate the base font pixel height (that is, at the default monitor DPI).

See Also

dxDPIAwareUtils.dxAssignFont

dxDPIAwareUtils Unit