Whether it is possible to add a font image as a background

Whether it is possible to add a font image as a background, for example, a rectangular shape, a color for painting the background portion of the letter.
My efforts to do so result in the production of the contour of the rectangle, which was under the background. And erasure of the letter did not happen. Instead, the image would overlay the previous letter.

A character like zero, for example, is made up of two contours. The outer clockwise contour and the inner counter-clockwise contour.

If you add another clockwise rectangular contour to use as a background, the inner contours both need to be reversed.
Counter-clockwise Contour.png
Change Direction.png

I will show my problem by drawing