From: Jiang Jiang <jiang.jiang@xxxxxxxxx> In stream->read function there will be check like if (stream->pos != pos) then fseek(...), so if stream->pos is set to pos before read then the seek may never happen. --- src/ftglue.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/ftglue.c b/src/ftglue.c index d5af810..b9e2129 100644 --- a/src/ftglue.c +++ b/src/ftglue.c @@ -82,7 +82,6 @@ ftglue_stream_seek( FT_Stream stream, { FT_Error error = 0; - stream->pos = pos; if ( stream->read ) { if ( stream->read( stream, pos, 0, 0 ) ) @@ -91,6 +90,7 @@ ftglue_stream_seek( FT_Stream stream, else if ( pos > stream->size ) error = FT_Err_Invalid_Stream_Operation; + stream->pos = pos; LOG(( "ftglue:stream:seek(%ld) -> %d\n", pos, error )); return error; } -- 1.7.4.1 _______________________________________________ Fontconfig mailing list Fontconfig@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/fontconfig