Add support for compiling with libfontconfig

Closes #34341.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>