Canvas.TextHeight not constistent across widgetsets
Original Reporter info from Mantis: theo @theo222
-
Reporter name:
Original Reporter info from Mantis: theo @theo222
- Reporter name:
Description:
Please see attached screenshots.
Code to produce this:
procedure TForm1.FormPaint(Sender: TObject);
var i, h:integer;
Str:String;
begin
Canvas.Font.Name:='times';
Canvas.Font.Size:=12;
Str:='ABCDEFGHjklmnop - '+LCLPlatformDirNames[WidgetSet.LCLPlatform];
h:=Canvas.TextHeight(Str);
For i:=0 to 10 do
Canvas.TextOut(10,(i*h)+10,Str);
end;
GTK: There is absolutely no external leading. It's pixel on pixel see "j". Looks different than a text in GTK TMemo
GT2: Looks OK, like text in GTK2 TMemo.
QT: Too much external leading. Different than TMemo in Qt.
WIN32: Looks OK (Screenshot taken under Wine, difference to the other Screenshots is caused by different ppi, not a problem).
Can this be "fixed" in the LCL Level or do component/application programmers have to work around it using {$ifdef LCLxxx} ?
Mantis conversion info:
- Mantis ID: 11249
- Version: 0.9.25 (SVN)
- Monitored by: » luizamerico (Luiz Americo)