> How does the formatter know which parts to fill?
In the case of groff (I can't say anything about the original troff), I don't think the formatter actually knows or cares, but simply passes the path on to the device postprocessor, which just incorporates it into the device-dependent output, to be dealt with by the actual output device. For Postscript, the Postscript Language Reference Manual has a short description of how filling conceptually works (Section 4.5.2, "Filling"). There's actually two different algorithms that can be selected, "non-zero winding rule" or "even-odd rule", which can give different results under certain circumstances, such as self-intersecting paths or paths consisting of multiple sub-paths. However, in the case of your bowtie, both render the same.