I think the previously mentioned procedure
draw_boxed_string(u8g_uint_t x, u8g_uint_t y, const char *s)
could be extended like this:
my_string_draw(u8g_uint_t x, u8g_uint_t y, const char *s, is_inverted)
if ( is_inverted )
u8g.drawStr(u8g, x, y, s);
It is a little bit difficult to make a general procedure out of this, which can be added to the
library. There are two points: First, the concept of the u8glib is to draw with one current color.
Indeed, when using u8g.drawStr on a pattern, the pattern "shines" trough the glyphs.
To be flexible for all displays I would need a background and a foreground color, which are
not available at the moment.
The second problem is to define the height of the background. Is it ascent + descent? or is it
the line spaceing? Or should u8g examine the hight of the provided string.
I think it is easy to implement your own definition, but difficult to find a generic procedure for that.