freetype-devel
[Top][All Lists]
Advanced

[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: Alexei Podtelezhnikov
Subject: Re: [ft-devel] PCF: Issues with lazy copy in `ft_bitmap_glyph_init'
Date: Tue, 28 Aug 2018 11:20:24 -0400

Werner, Armin,

> which indeed looks nicer – but just a bit :-) The question is whether
> we really need this...

Here is all the confusing parts about FT_Get_Glyph:
- It takes ownership on the bitmap without copying the data. Thus, it
should not be called twice on the same GlyphSlot and should fail if
FT_GLYPH_OWN_BITMAP is not set. The current behavior with deep copy
when FT_GLYPH_OWN_BITMAP is not set is a bug that need to be fixed.
- It copies the outline data without modifying original ownership. So
it is the opposite of bitmap glyphs. To add to the confusion
FT_OUTLINE_OWNER is in a different place.

I think we should stick to the lazy copy in both cases because it is
usually used once. The deep copy is a waste because FT_GlyphSlot is
usually discarded. I do not think the deep copy is useful.

Alexei



reply via email to

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