[Lazarus] Lazarus has unique font sizes

Marc Weustink marc at dommelstein.net
Sat Aug 15 13:33:40 CEST 2009


Jürgen Hestermann wrote:
> 
> 
>>>> Does anybody else excluding Paul know what negative fonts sizes mean? 
>> I admit a little explenation would help since it is not so trivial.
>> A positive fontsize is the size of a font in points
>> A negative fontsize is the size of a font in points including the 
>> internal leading at the top of the line
>> For fontheights it is the opposite since the height and size are 
>> related like:
>>  fontsize = -fontheight * 72/pixelsperinch
> 
> This seems not to be a general concept (Windows only?). 

This is how it is defined in delphi. Lazarus tries to be compatible with 
that.

> While searching 
> for negative font sizes on the web I found this:
> 
> http://cfsearching.blogspot.com/2008/03/imagedrawtext-negative-font-sizes-give.html 
> 
> 
> which shows a completely different effect when using negative font sizes.

Iirc Iv'e seen this on carbon too, but thats not realy relevant for lazarus.

Marc





More information about the Lazarus mailing list