TControl.ScaleFontsPPI procedure
Resizes a font to the specified Pixels per Inch setting.
Declaration
procedure ScaleFontsPPI(const AToPPI: Integer;
const AProportion: Double); virtualArguments
AToPPI | PPI setting to apply to the font. |
AProportion | Scaling factor applied to the font height. |
Description
ScaleFontsPPI is a method used to resize a font in the control to the specified display density (Pixels per Inch) using the scaling factor in AProportion (when needed).
A font may need to be scaled when the run-time PPI setting for the screen differs from the design-time value applied to the font. If the font height is not assigned at run-time, its height is set to the value in TFont.PixelsPerInch / Screen.PixelsPerInch.
When AToPPI has a positive non-zero value, it is stored in the TFont.PixelsPerInch property for the font. Otherwise, the existing TFont.PixelsPerInch value is adjusted using the scaling factor in AProportion.
ScaleFontsPPI may be overridden in descendent controls to call the method for its child controls.
ScaleFontsPPI is called form the AutoAdjustLayout method.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
