1

I tried to get my custom fonts working with QGIS Server, to no success. Windows Server 2019 with OSGeo-Install of QGIS Server 3.28.3-Firenze.

I tried to create environmental variables in httpd.conf of Apache: SetEnv QT_QPA_FONTDIR "C:\Windows\Fonts"

httpd_qgis.conf of QGIS-Server: DefaultInitEnv QT_QPA_FONTDIR "C:\Windows\Fonts"

Is the QGIS-Server-font-loader really necessary? https://github.com/avinet/qgis-server-font-loader

Any suggestions or hints?

This is how my httpd.conf and httpd_qgis.conf look like now: enter image description here

enter image description here

4
  • Try using «FcgidInitialEnv» instead of «DefaultInitEnv» in httpd_qgis.conf of QGIS-Server when you are creating the environmental variable QT_QPA_FONTDIR. The whole expression: FcgidInitialEnv QT_QPA_FONTDIR "C:\Windows\Fonts". Feb 1 at 10:09
  • Thanks Alex, but I already tried that... didn't work. It seems, FcgidInitialEnv was used in older QGIS Server versions, and now (in todays version) DefaultInitEnv should be used. (also all the standard variables are defined that way). I tried both, didn't make a difference.... I got this information from github.com/qgis/QGIS/issues/32404 Feb 1 at 12:14
  • In QGIS Server version 3.8, I actually had to use "SetEnv" for this variable (QT_QPA_FONTDIR), and not "FcgidInitialEnv" (it didn't work with FcgidInitialEnv). And since version 3.10.2, on the contrary: it stopped working with "SetEnv", and it started working with "FcgidInitialEnv". ☹ Maybe try with "SetEnv"? Feb 1 at 13:50
  • Hey Alex, thanks for your tip, but it doesn't make a difference. "SetEnv" is used in httpd.conf of Apache I think. "FcgidInitialEnv" or "DefaultInitEnv" are used in httpd_qgis.conf I think. Nevertheless, I tried "SetEnv" in httpd_qgis.conf but it doesn't work. Feb 2 at 8:55

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.