LCLIntf.DrawText(tmp.Canvas.Handle, PChar(AText), Length(AText), ARect, DT_CENTER or DT_VCENTER or DT_WORDBREAK or DT_CALCRECT);
There is no function to do this. How should it be done ? With TextFitInfo function ?If possible, yes. It should have similar params as TextRect method - text as string, TTextStyle and TRect, but rect should be as var and it height should be calculated like DrawText do. If it is difficult to do, it is not necessary. I'll try to around this in a different way