I didn't notice that the check is done only when xft is not available, but it should be done regardless since ftfont.c is used in both cases. Attached patch should be better.