> Sure, no worries; you can find a tiny C function + build script
> attached.  Please make sure to build FreeType with `clang' and
> `-fsanitize=address' for it to work :)

Thanks.  I see two possibilities to fix the bug.

(1) Avoid lazy copying in `FT_Get_Glyph'.

(2) Update the documentation:

      By default, `FT_Get_Glyph' can be used only once.[*] If you want
      more copies, use either `FT_Copy_Glyph' or call
      `FT_GlyphSlot_Own_Bitmap' before calling `FT_Get_Glyph' again.

What do you prefer?

> I think the else (proper copy) condition is bogus.  If bitmap is not
> owned, it is not valid and you cannot copy it, which leaves us with
> lazy case only.

Yep.  This must be fixed.


    Werner


[*] This statement is valid only for FT_GLYPH_FORMAT_BITMAP objects.
    For FT_GLYPH_FORMAT_OUTLINE objects, FreeType always creates a
    copy.

_______________________________________________
Freetype-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to