I'm having this error when I try to use the weasyprint
/usr/local/lib/python3.6/site-packages/weasyprint/fonts.py:230: UserWarning: FontConfig: No fonts configured. Expect ugly output.
'FontConfig: No fonts configured. '
/usr/local/lib/python3.6/site-packages/weasyprint/document.py:36: UserWarning: There are known rendering problems and missing features with cairo < 1.15.4. WeasyPrint may work with older versions, but please read the note about the needed cairo version on the "Install" page of the documentation before reporting bugs. http://weasyprint.readthedocs.io/en/latest/install.html
and the rendering:

I resolve installing font-config on Alpine Linux
I got squares (and the warning) despite having fontconfig installed. This was due to me not having any fonts installed. Hence it was resolved once I added fonts to my OS. (This came in handy for me https://stackoverflow.com/questions/56937689/alpine-linux-fonts)
Most helpful comment
I resolve installing font-config on Alpine Linux