From 8c539b0ab521d442d88c70243c04cbb9e40fe412 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 8 Apr 2015 10:10:17 +1000 Subject: Font preview for file browser D1002 by @plasmasolutions, with own refactoring. Note, needed to do a bad-level call here (IMB -> BLF) Also can't use the BLF API directly because its not thread-safe. So keep the function isolated (blf_thumbs.c). --- source/blender/imbuf/IMB_thumbs.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source/blender/imbuf/IMB_thumbs.h') diff --git a/source/blender/imbuf/IMB_thumbs.h b/source/blender/imbuf/IMB_thumbs.h index bea531c1442..404052f2e8e 100644 --- a/source/blender/imbuf/IMB_thumbs.h +++ b/source/blender/imbuf/IMB_thumbs.h @@ -54,7 +54,8 @@ typedef enum ThumbSize { typedef enum ThumbSource { THB_SOURCE_IMAGE, THB_SOURCE_MOVIE, - THB_SOURCE_BLEND + THB_SOURCE_BLEND, + THB_SOURCE_FONT, } ThumbSource; /* don't generate thumbs for images bigger then this (100mb) */ @@ -79,6 +80,11 @@ void IMB_thumb_makedirs(void); ImBuf *IMB_thumb_load_blend(const char *path); void IMB_thumb_overlay_blend(unsigned int *thumb, int width, int height, float aspect); +/* special function for previewing fonts */ +ImBuf *IMB_thumb_load_font( + const char *filename, + unsigned int x, unsigned int y); + #ifdef __cplusplus } #endif /* __cplusplus */ -- cgit v1.2.3