[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] How to do Underline?
From: |
David Turner |
Subject: |
Re: [Devel] How to do Underline? |
Date: |
Thu, 20 Mar 2003 09:33:09 +0100 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 |
Happy wrote:
> Hi,all
>
> I'm a newbie to FreeType library, and I've searched this mailing list
> for this question, but got no answer. Why FT doesnt support this
> feature? My work is render a string to a bitmap, support bold, italic,
> underline. Who can tell me how to do?
>
> LQ
Hello Happy,
underlining is not performed by the font engine, it is the responsability
of your text layout library/algorithm to perform this since it involves
"global" computations on the text to be displayed.
you can oblique the glyph outlines with an affine transform to mimic
italics.
for bold, you can either process the bitmaps to "widen" them, or use
the function FT_GlyphSlot_Embolden available in FT_SYNTHESIS_H, though
this is still a bit experimental (but now works well)
Best Regards,
- David Turner
- The FreeType Project (www.freetype.org)