Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenfont/intern/blf_font_win32_compat.c
| Context not available. | |||||
| #include "blf_internal.h" | #include "blf_internal.h" | ||||
| #include "CLG_log.h" | |||||
| static CLG_LogRef LOG = { "blf.i18n" }; | |||||
| /* internal freetype defines */ | /* internal freetype defines */ | ||||
| #define STREAM_FILE(stream) ((FILE *)stream->descriptor.pointer) | #define STREAM_FILE(stream) ((FILE *)stream->descriptor.pointer) | ||||
| #define FT_THROW(e) -1 | #define FT_THROW(e) -1 | ||||
| Context not available. | |||||
| file = BLI_fopen(filepathname, "rb"); | file = BLI_fopen(filepathname, "rb"); | ||||
| if (!file) { | if (!file) { | ||||
| fprintf(stderr, | CLOG_ERROR(&LOG, "could not open `%s'", filepathname); | ||||
| "FT_Stream_Open: " | |||||
| "could not open `%s'\n", filepathname); | |||||
| return FT_THROW(Cannot_Open_Resource); | return FT_THROW(Cannot_Open_Resource); | ||||
| } | } | ||||
| fseek(file, 0, SEEK_END); | fseek(file, 0, SEEK_END); | ||||
| stream->size = ftell(file); | stream->size = ftell(file); | ||||
| if (!stream->size) { | if (!stream->size) { | ||||
| fprintf(stderr, | CLOG_ERROR(&LOG, "opened `%s' but zero-sized", filepathname); | ||||
| "FT_Stream_Open: " | |||||
| "opened `%s' but zero-sized\n", filepathname); | |||||
| fclose(file); | fclose(file); | ||||
| return FT_THROW(Cannot_Open_Stream); | return FT_THROW(Cannot_Open_Stream); | ||||
| } | } | ||||
| Context not available. | |||||