[Lazarus] Controlling DPI

Hans-Peter Diettrich DrDiettrich1 at aol.com
Sat Mar 28 23:30:48 CET 2009


David W Noon schrieb:

>> Windows allows to change the font size (DPI) at any time, and most other 
>> systems have similar capabilities. Since Delphi has its roots in 
>> Windows, this definition also should apply to FPC/Lazarus.
> 
> The *point size* of the font has nothing whatsoever to do with the DPI
> of the screen or printer, other than the rendering engine querying the
> DPI of the device in order to render the text to the appropriate size in
> pica points.

Right. The application provides a font size, and the system translates 
it into pixels, based on the Screen.DPI value. Pixel based sizes, as 
used in the LCL for the origin and extent of the forms and controls, are 
not affected by the DPI settings.

If you want to change that DPI factor, your application can scale the 
size of every used font accordingly.

Please specify if you have something else in mind, like an zoom factor 
for *all* elements of your application.

DoDi




More information about the Lazarus mailing list