Shade black backgrounds differently (e.g. IME)

This commit is contained in:
Aaron van Geffen 2017-10-05 13:22:42 +02:00 committed by Marijn van der Werf
parent f2e795b4ef
commit fec0568b29
1 changed files with 5 additions and 0 deletions

View File

@ -805,6 +805,11 @@ static void ttf_draw_string_raw_ttf(rct_drawpixelinfo *dpi, const utf8 *text, te
// Centre of the glyph: use full colour.
*dst = colour;
}
else if (*dst < 10 && *src > 50)
{
// For black backgrounds, hint using grey pixels.
*dst = 13;
}
else if (*src > 70)
{
// Simulate font hinting by shading the background colour instead.