VSN1 LCD: transparent text / no black background behind glyphs?

Hi all,

When I render text over a coloured LCD area using Lua (for example with ldft), each character appears with a black rectangular background instead of showing the colour beneath it.

Is there already a way to render text with a transparent background, or could this be added to the Lua LCD API? Ideally, the text function would either draw only the glyph pixels or accept an optional background/transparent parameter.

This would make it possible to place labels cleanly over coloured panels, gradients, and artwork without first repainting a black rectangle behind the text.

Best,

Istvan

Hi Istvan, welcome to the forum!

The reason why letters have a background behind them is because of your choice of using draw_text_fast(). That draw method uses bitmap characters and all of them have an 8x8 area, no matter which character you render. Because of this there will always be a 8x8 black background to them.

You also have the option of using draw_text() which is a bit slower, but uses the Space Mono font. These characters have no background to them.