Re: FT_Render_Glyph() and the usage of the stack for embeded software.

Alexei Podtelezhnikov <[email protected]> Tue, 21 Sep 2021 10:31:17 -0400
Newsgroups gmane.comp.fonts.freetype.user
Message-ID <CAJU=AjUoP4NMFOyx-O3p1-HkksOLg6WEz7zbhWpyBu+6xprmwA@mail.gmail.com>
> Is there any way that would allow Ft_Render_Glyph() to use more heap instead?

We use stack for performance reasons, but I never checked that. The
majority of rendering stack are reserved here:

https://gitlab.freedesktop.org/freetype/freetype/-/blob/master/src/smooth/ftgrays.c#L1941
for smooth anti-aliased rendering

or here
https://gitlab.freedesktop.org/freetype/freetype/-/blob/master/src/raster/ftraster.c#L3234
for pixelated monochrome rendering.

You should try to patch in FT_NEW_ARRAY and FT_FREE from
freetype/internal/ftmemory.h in those functions. Please report back if
the performance is reasonable. We might create a general option for
this.

Best,
Alexei