hedgewars/uRenderUtils.pas
changeset 7069 bcf9d8e64e92
parent 7063 a0326412e96a
child 7291 ad4b6c2b09e8
child 7546 b50556f2a0e8
equal deleted inserted replaced
7068:b1b7eb9c8cc9 7069:bcf9d8e64e92
   255 
   255 
   256 function RenderStringTexLim(s: ansistring; Color: Longword; font: THWFont; maxLength: LongWord): PTexture;
   256 function RenderStringTexLim(s: ansistring; Color: Longword; font: THWFont; maxLength: LongWord): PTexture;
   257 var w, h: LongInt;
   257 var w, h: LongInt;
   258     finalSurface: PSDL_Surface;
   258     finalSurface: PSDL_Surface;
   259 begin
   259 begin
   260     if length(s) = 0 then s:= ' ';
   260     if length(s) = 0 then s:= _S' ';
   261     font:= CheckCJKFont(s, font);
   261     font:= CheckCJKFont(s, font);
   262     w:= 0; h:= 0; // avoid compiler hints
   262     w:= 0; h:= 0; // avoid compiler hints
   263     TTF_SizeUTF8(Fontz[font].Handle, Str2PChar(s), @w, @h);
   263     TTF_SizeUTF8(Fontz[font].Handle, Str2PChar(s), @w, @h);
   264     if (maxLength <> 0) and (w > maxLength) then w := maxLength;
   264     if (maxLength <> 0) and (w > maxLength) then w := maxLength;
   265 
   265