diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-11-26 19:33:42 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-11-26 19:33:42 +0300 |
commit | cf0820d6285c3a9379dd529ee50dcf39e2efa21c (patch) | |
tree | 08fb7672ce9f8e355ca2e99f6a52a14e3584f986 /source/blender/blenkernel/intern/image_gen.c | |
parent | 782d7b312ff6799258fb318e2aa5bbd64dbd2a9d (diff) |
change monospace font to be an extern, not good final design but better then loading the same font 3 times.
need to load twice still because render may use the font in a thread.
Diffstat (limited to 'source/blender/blenkernel/intern/image_gen.c')
-rw-r--r-- | source/blender/blenkernel/intern/image_gen.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/image_gen.c b/source/blender/blenkernel/intern/image_gen.c index 9248ce69280..b765cf29a3d 100644 --- a/source/blender/blenkernel/intern/image_gen.c +++ b/source/blender/blenkernel/intern/image_gen.c @@ -298,16 +298,17 @@ static void checker_board_grid_fill(unsigned char *rect, float *rect_float, int } /* defined in image.c */ -extern int stamp_font_begin(int size); static void checker_board_text(unsigned char *rect, float *rect_float, int width, int height, int step, int outline) { - int x, y, mono; + int x, y; int pen_x, pen_y; char text[3]= {'A', '1', '\0'}; + const int mono= blf_mono_font; + + BLF_aspect(mono, 1.0); + BLF_size(mono, 54, 72); /* hard coded size! */ - /* hard coded size! */ - mono= stamp_font_begin(54); BLF_buffer(mono, rect_float, rect, width, height, 4); for(y= 0; y < height; y+=step) |