var
bmp: Graphics.TBitmap;
s: string = 'abc';
begin
bmp := TBitmap.Create;
try
bmp.Width := Canvas.TextWidth(s);
bmp.Height := Canvas.TextHeight(s);
bmp.Canvas.Font.Color := clBlack;
bmp.Canvas.Brush.Color := clWindow;
bmp.Canvas.FillRect(0, 0,bmp.Width, bmp.Height);
bmp.Canvas.TextOut(0, 0, s);
Canvas.StretchDraw(Rect(0, 0, bmp.Width, bmp.Height + 20), bmp);
finally
bmp.Free;
end;
end;