[Lazarus] WSRegister error on console application

Andrea Mauri andrea.mauri.75 at gmail.com
Mon May 4 10:38:39 CEST 2009


Does anyone the difference between TFont.Height and TFont.Size?

It seams to me that Height is measured in pixels and Size is some
other unit which I don't know. Even worse, it doesn't seam to be an
international system unit, but rather an american unit (some fraction
of inches).

The Delphi docs say:

"Use Size to specify the point size of the font. If the value is
negative, the internal leading that appears at the top of each line of
text is included. If the value is positive, Size represents the height
of the characters but not the internal leading.

To determine the size of the font in pixels, use the Height property
instead. The value of Size can be obtained from the height in pixels
using this formula:

Copy Code
Font.Size = -Font.Height * 72 / Font.PixelsPerInch
When the Size property has a positive value, the Height property has a
negative value. When the Height property has a positive value, the
Size property has a negative value. "

A rather exoteric property IMHO. Or yet another Windowsism in Delphi

Felipe Monteiro de Carvalho

More information about the Lazarus mailing list