freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rendering glyph outline and normal to matching bitmaps


From: Alexei Podtelezhnikov
Subject: Re: Rendering glyph outline and normal to matching bitmaps
Date: Sat, 9 May 2020 12:51:56 -0400

On Sat, May 9, 2020 at 12:37 PM Timo Suoranta <address@hidden> wrote:
>
> I render glyph twice, first to get bitmap of 'normal' glyph, and second to 
> get bitmap with outline stroke.
> I need to combine these to a single two-channel bitmap.
> But the bitmaps have different sizes. How do can I render normal and outline 
> to matching bitmaps?
> Or would it be possible to get such two-channel bitmap directly with freetype?
>
> Thanks!

The top-left corner offsets for each bitmap are provided in
FT_GlyphSlot->bitmap_left and FT_GlyphSlot->bitmap_top. If you
correctly use those, you can trivially blend the bitmaps onto a target
surface using whatever color you prefer.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]