Jump to content
  • Advertisement
Sign in to follow this  
_Krish_

how to display underlined fonts using FreeType

This topic is 3210 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

Hi all, i am using freetype library in my application for text display. i want to display underlined characters in my application. how can i change do this in freetype. please help.. _KRISH_ [Edited by - _Krish_ on November 2, 2009 6:03:24 AM]

Share this post


Link to post
Share on other sites
Advertisement
According to the FreeType FAQs -
Quote:
17. Is it possible to perform styling (like oblique, italic, bold,
underline, etc.) with FreeType?

...

- Underlining and stroking, are not really part of the glyphs.
They're simply lines that are printed on the glyph after it has
been rendered. Each TrueType file provides, in its OS/2 table,
which is accessible through the face object properties in
FreeType, several values that define the position and width of
those lines, in notional font units.

If you want to use them, you'll have to scale these values to
your current instance/point size, then draw the lines yourself.


Of course, this was in the FAQ section for FreeType 1. I couldn't find a question in the FreeType 2 FAQs that was comparable, but I would assume that they take the same approach in 2.

Share this post


Link to post
Share on other sites
Sign in to follow this  

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