On Tue, Dec 20, 2022 at 9:11 PM ricky rocky <rickyrocky....@gmail.com> wrote:
> #define FT_RENDER_POOL_SIZE  16384L
>
> This definition is used in smooth/ftgrays.c/gray_convert_glyph() as a local 
> buffer.
> For my small RAM chip, it is the large size.

You cannot spare 16kB for rendering. Alrighty. Or, do you want to
allocate it elsewhere, not on stack?

> For 240x320 LCD, Could I reduce this size? and how much is good?

What is the text pixel size that you need? Very roughly, the number of
nontrivial pixels is 8x the pixel size, if your font is not too fancy.
Each gray pixel is 16 bytes on 32 bit architectures, more on 64 bits.

For example, for 20 pixels per EM, you can probably get away with 2kB.
You can use even less, but you will pay with performance.

I would like to suggest doubling to pool because 32kB is reasonable these days.

Alexei

Reply via email to