Rendering in general is a very murky subject in Emacs. There is a peculiar old code, and no one even knows how it works in its entirety.
Although emacs is very customizable, rendering is where it gets very tough, unfortunately. Few had hopes for the new display engines, read emacs-ng. Alas, those are just hopes.