diff --git a/src/server/qgis_map_serv.cpp b/src/server/qgis_map_serv.cpp index 2820267bac7..ba03ae599f8 100644 --- a/src/server/qgis_map_serv.cpp +++ b/src/server/qgis_map_serv.cpp @@ -65,6 +65,13 @@ int main( int argc, char *argv[] ) #ifdef HAVE_SERVER_PYTHON_PLUGINS server.initPython(); #endif + +#ifdef Q_OS_WIN + // Initialize font database before fcgi_accept. + // When using FCGI with IIS, environment variables (QT_QPA_FONTDIR in this case) are lost after fcgi_accept(). + QFontDatabase fontDB; +#endif + // Starts FCGI loop while ( fcgi_accept() >= 0 ) {