freetype-devel
[Top][All Lists]
Advanced

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

Re: FT_Bitmap and FT_BitmapGlyph life cycles


From: Hin-Tak Leung
Subject: Re: FT_Bitmap and FT_BitmapGlyph life cycles
Date: Wed, 19 Jul 2023 05:44:16 +0000 (UTC)

On Wednesday, 19 July 2023 at 05:42:32 BST, Werner LEMBERG <wl@gnu.org> wrote:

> > How to throw away the bitmap resulting from running
> > FT_Glyph_To_Bitmap(), and replacing it with a new one that may be
> > one pixel large or smaller in width and/or height?

> It's not exactly clear to me what you want to do, but what about using
> `FT_New_Glyph` and/or `FT_Glyph_Copy`?

I have indeed looked at FT_New_Glyph(). It returns a FT_BitmapGlyph with zero width/height. I tried after FT_New_Glyph with:

    FT_Memory memory = library->memory;
     FT_MEM_ALLOC( bitmap->bitmap.buffer, mysize);

to make it bigger, but it always segfaults. Maybe if I stare at the code for longer it will come to me :-).

reply via email to

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