[Lazarus] Strange Font.Height

Valdas Jankūnas zmuogs at gmail.com
Tue Jul 4 22:58:36 CEST 2017


Hello,

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?

Kubuntu 17.04, Lazarus 1.9.0, FPC 3.0.0

-- 
   Valdas Jankūnas


More information about the Lazarus mailing list