SDL_ttf and zzip-lib problem (solved)

Hi All,

I downloaded and compiled SDL_ttf version 2.0.6. I’m using it on a project
that uses the zzip-lib to load resources from a .zip file via SDL_RWops.
When you ask zzip-lib to open a file filename.ext inside a it
first tries to open zipname/filename.exe and if it fails it tries to find an
entry filename.ext inside the file.

SDL_ttf works just fine in the first case but fails to open a TTF font in
the second (unknown file format). I tracked down the problem and it’s inside
the RWread function. The freetype library can call your customized stream
function with a count of 0 to perform seek operations. I changed the return
statement of this function in SDL_ttf.c (at line 226) to:

return count == 0 : 0 ? SDL_RWread(src, buffer, 1, (int)count);

and now it works just fine with both open strategies of the zzip-lib.


Andre de Leiradella