OK, tried your suggestions - I set the following, one at a time, to 1. Here are the results:
#define FALLBACK 0 clean
#define NO_GLYPH_CACHE 0 clean
#define NO_GLYPHS_TO_DST 0 clean
#define NO_GLYPHS_VIA_MASK 0 bad
#define NO_SMALL_MASK 0 bad
#define NO_GLYPHS_SLOW 0 bad
#define NO_DISCARD_MASK 0 bad
Where it says "clean", changing only this define to 1 (and leaving the rest at 0) fixed the problem. Where it says "bad", the bug still existed with only this define set to 1.
Applying the gen4_render.c patches (with all of the above unchanged at set to 0) had no effect - the bug still existed.
OK, tried your suggestions - I set the following, one at a time, to 1. Here are the results:
#define FALLBACK 0 clean
#define NO_GLYPH_CACHE 0 clean
#define NO_GLYPHS_TO_DST 0 clean
#define NO_GLYPHS_VIA_MASK 0 bad
#define NO_SMALL_MASK 0 bad
#define NO_GLYPHS_SLOW 0 bad
#define NO_DISCARD_MASK 0 bad
Where it says "clean", changing only this define to 1 (and leaving the rest at 0) fixed the problem. Where it says "bad", the bug still existed with only this define set to 1.
Applying the gen4_render.c patches (with all of the above unchanged at set to 0) had no effect - the bug still existed.
Let me know if this helps.