[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] PCF: Issues with lazy copy in `ft_bitmap_glyph_init'
From: |
Werner LEMBERG |
Subject: |
Re: [ft-devel] PCF: Issues with lazy copy in `ft_bitmap_glyph_init' |
Date: |
Sat, 25 Aug 2018 18:30:03 +0200 (CEST) |
> 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.
- [ft-devel] PCF: Issues with lazy copy in `ft_bitmap_glyph_init', armin, 2018/08/23
- Message not available
- Re: [ft-devel] PCF: Issues with lazy copy in `ft_bitmap_glyph_init', Werner LEMBERG, 2018/08/24
- Re: [ft-devel] PCF: Issues with lazy copy in `ft_bitmap_glyph_init', armin, 2018/08/24
- Re: [ft-devel] PCF: Issues with lazy copy in `ft_bitmap_glyph_init', Werner LEMBERG, 2018/08/25
- Re: [ft-devel] PCF: Issues with lazy copy in `ft_bitmap_glyph_init', armin, 2018/08/25
- Re: [ft-devel] PCF: Issues with lazy copy in `ft_bitmap_glyph_init',
Werner LEMBERG <=
- Re: [ft-devel] PCF: Issues with lazy copy in `ft_bitmap_glyph_init', Werner LEMBERG, 2018/08/25
- Re: [ft-devel] PCF: Issues with lazy copy in `ft_bitmap_glyph_init', armin, 2018/08/25
- Re: [ft-devel] PCF: Issues with lazy copy in `ft_bitmap_glyph_init', armin, 2018/08/25
- Re: [ft-devel] PCF: Issues with lazy copy in `ft_bitmap_glyph_init', Werner LEMBERG, 2018/08/25
- Re: [ft-devel] PCF: Issues with lazy copy in `ft_bitmap_glyph_init', armin, 2018/08/25
- Re: [ft-devel] PCF: Issues with lazy copy in `ft_bitmap_glyph_init', Alexei Podtelezhnikov, 2018/08/25
- Re: [ft-devel] PCF: Issues with lazy copy in `ft_bitmap_glyph_init', Werner LEMBERG, 2018/08/25
- Re: [ft-devel] PCF: Issues with lazy copy in `ft_bitmap_glyph_init', Alexei Podtelezhnikov, 2018/08/25
- Re: [ft-devel] PCF: Issues with lazy copy in `ft_bitmap_glyph_init', Werner LEMBERG, 2018/08/26
- Re: [ft-devel] PCF: Issues with lazy copy in `ft_bitmap_glyph_init', armin, 2018/08/26