>
> In practical terms, we need the bounding box to initialize the
> top_left and the bitmap size. These values might be needed even if the
> actual memory allocation and rendering is postponed indefinitely. One
> should *not* expect immediate allocation of memory and rendering. For
> this purpose FT_Renderer_Class is equipped with 'get_glyph_bbox',
> separate from 'render_glyph'. It is not currently used however and an
> outline glyph sets up its top-left and the bitmap size based on the
> outline cbox.

In other words, 'ft_glyphslot_preset_bitmap' should be looping through
> appropriate renderers calling 'get_glyph_bbox'. This is how it is
> supposed to work.
>

Yes, currently for TTF/CFF outlines, `FT_Load_Glyph' calls
`ft_glyphslot_preset_bitmap' but the function only works for traditional
outlines. Instead it should find the right rendering module, and use its
interface to get the bounding box and using that bounding box, perform
presetting.

I need to check a few things about this to make sure whether this can work
for SVG glyphs or not. Will let you guys know how it goes. :)
_______________________________________________
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to