[Lazarus] Strange Font.Height

Ondrej Pokorny lazarus at kluug.net
Tue Jul 4 23:19:20 CEST 2017


On 04.07.2017 22:58, Valdas Jankūnas via Lazarus wrote:
> code (WS: GTK2):
>
>   i := Canvas.TextHeight('I');
>   writeln(i);
>   Canvas.Font.Height := i;
>   i:= Canvas.TextHeight('I');
>   writeln(i);
>   Canvas.Font.Height := i;
>   i:= Canvas.TextHeight('I');
>   writeln(i);
>
> I get:
> 24
> 33
> 45
>
> I think that "Canvas.Font.Height" and "Canvas.TextHeight('a')" should 
> be same. Why it increases after assignment, is it a bug or I don't 
> know something? Is there DPI (mine is 141) related somehow?

Can you test Lazarus 1.6.x, please?

Ondrej


More information about the Lazarus mailing list