This is normal behavior. You must change your drawing order so that everything is correct.
As you draw text on a translucent surface, its smoothing pixels will also be translucent, but between the color of the text and the background of the first image.
Now, if you draw the result on another image, you will have the same transparent pixels, where there is no text, there is no transparency, where the text and color variables and colors for the smoothing pixels.
Note that they will have different colors, as anti-aliasing tries to propagate color differences as well as differences in brightness.
Either write on an opaque surface, or hold the recording to the end. (Or turn off all anti-aliasing, but that's not nice.)
source
share