Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Borghetti <bdiego@gmail.com>2009-08-18 23:26:53 +0400
committerDiego Borghetti <bdiego@gmail.com>2009-08-18 23:26:53 +0400
commit7d812822bd9c522efc0730a4f219ccec9cfb4a57 (patch)
treeabd0a537d339cb3f4c63a05ab9016b96312671ca /source/blender/blenfont/intern/blf_glyph.c
parent94511c672920e8ae0ebca4fca2a563a46d07b85b (diff)
Stamp info back only for float buffer. (next commit add unsigned char).
A couple of new functions: BLF_width_and_height - Merge of BLF_width and BLF_height in one call to avoid freetype2 stuff. BLF_buffer - Set the buffer, size and number of channel. BLF_buffer_col - Set the text color (the alpha is not used right now). BLF_draw_buffer - Draw the text in the current buffer. Also tweak a little the boundbox and draw function to avoid access the freetype2 and use the cache info. By default the font size is 12, the UI still need work to allow change the font and size.
Diffstat (limited to 'source/blender/blenfont/intern/blf_glyph.c')
-rw-r--r--source/blender/blenfont/intern/blf_glyph.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c
index 78df8ff2bc6..f3db3ddc9a5 100644
--- a/source/blender/blenfont/intern/blf_glyph.c
+++ b/source/blender/blenfont/intern/blf_glyph.c
@@ -217,6 +217,7 @@ GlyphBLF *blf_glyph_add(FontBLF *font, FT_UInt index, unsigned int c)
g->next= NULL;
g->prev= NULL;
g->c= c;
+ g->idx= index;
g->tex= 0;
g->build_tex= 0;
g->bitmap= NULL;
@@ -238,6 +239,7 @@ GlyphBLF *blf_glyph_add(FontBLF *font, FT_UInt index, unsigned int c)
g->advance= ((float)slot->advance.x) / 64.0f;
g->pos_x= slot->bitmap_left;
g->pos_y= slot->bitmap_top;
+ g->pitch= slot->bitmap.pitch;
FT_Outline_Get_CBox(&(slot->outline), &bbox);
g->box.xmin= ((float)bbox.xMin) / 64.0f;