Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

stefu

freetype2: italic or bold style

This topic is 5613 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
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!!

Share this post


Link to post
Share on other sites
Advertisement
Since no-one seems to know the answer, I''v come to conclusion that it is not possible, it''s just read only stuff.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!