TextOut is what you have to use, no way around. It is slightly more tricky to do if you want to cut from spaces but this is roughly how you can do it by cutting everything:
[pascal]var
i,charW,charH: integer;
cur,position: TPoint;
text: string; // This you can read from TStringList.Text or anything
line: string;
//maxWrapWidth: integer; // How wide the text can be before wrap
begin
with SomeOfYourSurfaces.Canvas do begin
position:=Point(3,3); // This is upper corner of printed text
cur:=Point(0,0);
line:='';
charH:=TextHeight('I'); // or you can manually type any row height
for i:=1 to length(text) do begin
charW:=TextWidth(text[i]);
if cur.X+charW>maxWrapWidth then begin
TextOut(position.X, position.Y+cur.Y, line);
cur.X:=0;
cur.Y:=cur.Y+charH;
line:=text[i];
end else begin
cur.X:=cur.X+charW;
line:=line+text[i];
end;
end;
TextOut(position.X, position.Y+cur.Y, line);
Release; // Needed with DelphiX surface, not with normal canvas
end;
end;[/pascal]
Hope i didn't forget anything