Closed freedom7979 closed 4 years ago
QGIS (and QGIS Server) should use the fonts installed on the machine.
If the machine where you prepare the project is different from the server, you might have that problem. But if you are using the same machine, you should have the same font available in QGIS and in QGIS Server.
Are you running QGIS Server on the same machine where you prepared the project? Or your QGIS desktop is different from your QGIS Server? Do you have access to the server and can you check if the font is installed on the server?
I'm running QGIS Server and QGIS on the same machine. Please have you an idea way QGIS Server did not find fonts? Thank you very much for your reply.
I'm running QGIS Server and QGIS on the same machine. Please have you an idea way QGIS Server did not find fonts? Thank you very much for your reply.
regardless of the WMS client? have you tried with another font?
regardless of the WMS client? have you tried with another font?
In different WMS clients the result is the same. I used different fonts and the result is the same.
It seems to be using the same font regardless of the setting. Other settings seem to respect size, color, bold, and so on.
In different WMS clients the result is the same. I used different fonts and the result is the same. It seems to be using the same font regardless of the setting. Other settings seem to respect size, color, bold, and so on.
any chance you can test your project and service using qgis server on another platform... say for example Ubuntu (there are plenty of VMs/containers can be used)?
any chance you can test your project and service using qgis server on another platform... say for example Ubuntu (there are plenty of VMs/containers can be used)?
I certainly can, but I'd rather use IIS on Windows. Is there any chance that it will ever work on IIS? Other features work fine :) and issue with the fonts are last thing for my satisfaction. Thank you very much for your reply.
@freedom7979 Take a look at this email thread http://osgeo-org.1560.x6.nabble.com/QGIS3-Server-on-Windows-Server-and-IIS-td5404369.html
At the end Kasper refers to a specific problem with fonts in Windows and how to solve the issue (with a QGIS Server plugin).
I've just copied and paste here:
BTW, there is a problem with fonts in this version.
See the fontloader example at
https://github.com/avinet/qgis-server-font-loader
<https://github.com/avinet/qgis-server-font-loader> , add it to the plugins
and point it to the windows font directory.
I try qgis-server-font-loader, but this plugin for version 2.5-2.99. I remove qgisMaximumVersion=2.99 from metadata.txt, so he could at least try to load. But plugin loaded with error:
13:15:21 INFO ..\..\..\src\server\qgsserverplugins.cpp[4048]: Python support library loaded successfully.
13:15:21 WARNING Python error[4048]: Traceback (most recent call last): File "C:\OSGeo4W64\apps\qgis/./python\qgis\utils.py", line 591, in startServerPlugin server_plugins[packageName] = package.serverClassFactory(serverIface) File "C:/Users/Svoboda/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgis-server-font-loader\__init__.py", line 4, in serverClassFactory from FontLoader import FontLoaderServer File "C:\OSGeo4W64\apps\qgis/./python\qgis\utils.py", line 686, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ModuleNotFoundError: No module named 'FontLoader'
13:15:21 WARNING Couldn't load server plugin qgis-server-font-loader due to an error when calling its serverClassFactory() method[4048]: Couldn't load server plugin qgis-server-font-loader due to an error when calling its serverClassFactory() method
ModuleNotFoundError: No module named 'FontLoader'
Traceback (most recent call last): File "C:\OSGeo4W64\apps\qgis/./python\qgis\utils.py", line 591, in startServerPlugin server_plugins[packageName] = package.serverClassFactory(serverIface) File "C:/Users/Svoboda/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgis-server-font-loader\__init__.py", line 4, in serverClassFactory from FontLoader import FontLoaderServer File "C:\OSGeo4W64\apps\qgis/./python\qgis\utils.py", line 686, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ModuleNotFoundError: No module named 'FontLoader'
Plugin doesn't solve my trouble
Duplicated of #29244
I have the same problem
QGIS Server started working in version 3.10.0-3. Respectively, he began to respect variable QT_QPA_FONTDIR in Web.config. Thank you for fixing the bug! The picture shows diacritics:
Describe the bug
In QGIS Server, fonts are poorly displayed on Windows. This is how it looks in QGIS - font Times New Roman This is how it looks label from QGIS Server by WMS - font is unknown for my and wrong char "ě"
How to Reproduce