Use a different threshold for merging the outline and glyph and also
adjust the merge amount. This fails to give complete transparency (and
thus will yield slightly darker looking glyphs, usually), but avoids
very ugly looking artefacts at the edge between border and glyph that
were still prevalent.
unsigned char c_g, c_o;
c_g = g[x];
c_o = o[x];
- o[x] = (c_o > c_g) ? c_o - (c_g / 2) : 0;
+ o[x] = (c_o > (3 * c_g) / 5) ? c_o - (3 * c_g) / 5 : 0;
s[x] = (c_o < 0xFF - c_g) ? c_o + c_g : 0xFF;
}
g += bm_g->w;