FT_GlyphSlot slot = face->glyph; // a small shortcut
FT_UInt glyph_index;
int pen_x, pen_y, n;
.. initialise library ..
.. create face object ..
.. set character size ..
pen_x = 300;
pen_y = 200;
for ( n = 0; n < num_chars; n++ )
{
// load glyph image into the slot (erase previous one)
error = FT_Load_Char( face, text[n], FT_LOAD_RENDER );
if (error) continue; // ignore errors
// now, draw to our target surface
my_draw_bitmap( &slot->bitmap,
pen_x + slot->bitmap_left,
pen_y - slot->bitmap_top );
// increment pen position
pen_x += slot->advance.x >> 6;
}
I''v searched documentation, but can''t find function that takes style as parameter
Thanks!!
freetype2: italic or bold style
Hello!
Where do I use FT_STYLE_FLAG_ITALIC or FT_STYLE_FLAG_BOLD in freetype 2 to ge italic or bold styles?
I am using this sample rendering code from freetype tutorial
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement