Efficient way to go about dynamic outlined text

Using just 1 color for dynamic text, can make it hard to read if the backgound is the same color.

Has anyone come up with good strategies of nice text that is outlined with another color?

I have no idea but maybe somehow a filter could get the pixel colors behind the text somehow? Then set the color of the text opposite of the color gotten.

There is a way to pass textures to 2d filters so if you can generate an image with text on it a filter could be made to invert the rendered image where the text image shows

2dfilter or custom shader is probably not the most efficient way to handle this so just use dark black for object color… except the time when background is dark

Some ideas that come to mind:

  1. Create a custom font that is outlined.
  2. Find (somehow) the texture that the font is using and run an edge-detect on it.
  3. Use bitmap text in normal BGE (UPBGE doesn’t support it)