no sure if 'rewind' is a standard - use fseek instead

This commit is contained in:
artemp 2014-06-23 16:59:30 +01:00
parent 4acba303a5
commit 1c25c34dec

View file

@ -142,9 +142,9 @@ bool freetype_engine::register_font_impl(std::string const& file_name, FT_Librar
FT_StreamRec streamRec; FT_StreamRec streamRec;
memset(&args, 0, sizeof(args)); memset(&args, 0, sizeof(args));
memset(&streamRec, 0, sizeof(streamRec)); memset(&streamRec, 0, sizeof(streamRec));
fseek (file , 0 , SEEK_END); fseek(file, 0, SEEK_END);
std::size_t file_size = ftell(file); std::size_t file_size = ftell(file);
rewind(file); fseek(file, 0, SEEK_SET);
streamRec.base = 0; streamRec.base = 0;
streamRec.pos = 0; streamRec.pos = 0;
streamRec.size = file_size; streamRec.size = file_size;