Skip to content

build: Only use fallback dep for FontConfig when needed/requested

Chun-wei Fan requested to merge improve-fontconfig-dep-search into master

Hi,

This attempts to improve the build experience in regards to the use of FontConfig during the build, namely:

  • Only use the fallback dependency for FontConfig when it is required or requested (see next point), and we couldn't find it using pkg-config files and (on MSVC builds) looking for FontConfig's headers and .lib.

  • Add an option for Windows and macOS builds whether we want to use FontConfig, so that we only use the fallback dependency for it if it is required (i.e. we are not building for Windows nor macOS, meaning that we must use FontConfig) or we indicated that we want to use FontConfig anyways, when FontConfig cannot be found.

The main reasoning behind this is that setting up FontConfig can be quite hard to get right, outside of *NIX, in particular for Windows builds.

With blessings, thank you!

Merge request reports