equal
deleted
inserted
replaced
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 |