Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QFontDatabase: Cannot find font directory /usr/local/qt5pi/lib/fonts.



  • Hello,
    in the past I got a lot of good tips here. Thank you!
    Now I got an quiet old problem and I know there is only a little knowledge missing.
    But I couldn't find a simple solution.
    When I start an application (widget) created by
    Qt Creator 4.8.0-rc1 (4.7.84)
    Based on Qt 5.12.0 (GCC 5.3.1 20160406 (Red Hat 5.3.1-6), 64 bit)
    Built on Nov 23 2018 01:25:42
    From revision 7c17edcce2

    I get some errors :
    QFontDatabase: Cannot find font directory /usr/local/qt5pi/lib/fonts.
    On the raspberry there is no directory /usr/local/qt5pi/lib/fonts.
    In the widget I write some text (font = Ubuntu, 10).
    I get some errors on ma LCD-display ( 3.5" with HDMI).
    Please has somebody any idea?


  • Lifetime Qt Champion

    Hi,

    @K-Str said in QFontDatabase: Cannot find font directory /usr/local/qt5pi/lib/fonts.:

    Cannot find font directory /usr/local/qt5pi/lib/fonts.

    Do you have that folder on your desktop machine ? If so, simply copy it over to your RPi.



  • @SGaist ,
    thank you for your tip.
    I found a lot of directories called font on my host.

    /etc/apparmor.d/abstractions/fonts
    /etc/fonts
    /etc/X11/fonts
    /home/kurt/raspi/sysroot/usr/lib/python2.7/dist-packages/scrollphathd/fonts
    /home/kurt/raspi/sysroot/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/lib/fonts
    /home/kurt/raspi/sysroot/usr/lib/python3/dist-packages/scrollphathd/fonts
    /home/kurt/Qt/5.10.1/Src/qtdeclarative/examples/quick/text/fonts
    /home/kurt/Qt/5.10.1/Src/qtdeclarative/examples/quick/text/fonts/content/fonts
    /home/kurt/Qt/5.10.1/Src/qtquickcontrols2/examples/quickcontrols2/texteditor/fonts
    /home/kurt/Qt/5.10.1/Src/qtquickcontrols2/examples/quickcontrols2/swipetoremove/fonts
    /home/kurt/Qt/5.10.1/Src/qtquickcontrols2/tests/manual/fonts
    /home/kurt/Qt/5.10.1/Src/qtquickcontrols2/tests/manual/testbench/fonts
    /home/kurt/Qt/5.10.1/Src/qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/platform/fonts
    /home/kurt/Qt/5.10.1/Src/qtwebengine/src/3rdparty/chromium/third_party/skia/src/fonts
    /home/kurt/Qt/5.10.1/Src/qtwebengine/src/3rdparty/chromium/third_party/skia/resources/fonts
    /home/kurt/Qt/5.10.1/Src/qtquickcontrols/examples/quickcontrols/extras/gallery/fonts
    /home/kurt/Qt/5.10.1/Src/qtquickcontrols/examples/quickcontrols/extras/dashboard/fonts
    /home/kurt/Qt/5.10.1/Src/qtquickcontrols/src/extras/Styles/Flat/fonts
    /home/kurt/Qt/Examples/Qt-5.10.1/quickcontrols/extras/gallery/fonts
    /home/kurt/Qt/Examples/Qt-5.10.1/quickcontrols/extras/dashboard/fonts
    /home/kurt/Qt/Examples/Qt-5.10.1/quick/text/fonts
    /home/kurt/Qt/Examples/Qt-5.10.1/quick/text/fonts/content/fonts
    /home/kurt/Qt/Examples/Qt-5.10.1/quickcontrols2/texteditor/fonts
    /home/kurt/Qt/Examples/Qt-5.10.1/quickcontrols2/swipetoremove/fonts
    /home/kurt/Qt/Tools/QtCreator/share/qtcreator/fonts
    /home/kurt/Qt/Tools/Preview/Qt Creator 4.8.0-rc1/share/qtcreator/fonts
    /var/lib/ghostscript/fonts
    /snap/core/4917/etc/apparmor.d/abstractions/fonts
    /snap/core/4917/usr/local/share/fonts
    /snap/core/4917/usr/share/fonts
    /snap/core/6405/etc/apparmor.d/abstractions/fonts
    /snap/core/6405/usr/local/share/fonts
    /snap/core/6405/usr/share/fonts
    /snap/gnome-3-26-1604/78/etc/fonts
    /snap/gnome-3-26-1604/78/usr/share/fonts
    /snap/gnome-3-26-1604/70/etc/fonts
    /snap/gnome-3-26-1604/70/usr/share/fonts
    /usr/local/share/fonts
    /usr/lib/firefox/fonts
    /usr/share/fonts
    /usr/share/lintian/data/files/fonts
    /usr/share/ghostscript/fonts
    /usr/share/yelp/mathjax/fonts
    /usr/share/yelp/mathjax/jax/output/HTML-CSS/fonts
    /usr/include/X11/fonts
    /usr/src/linux-headers-4.15.0-29/lib/fonts
    /usr/src/linux-headers-4.15.0-45/lib/fonts
    /boot/grub/fonts
    

    But I have no idea which one I should take.
    Which one would you recommend?
    Kurt



  • @K-Str you may want to check the solution I found some time ago...



  • @Pablo-J-Rogina ,
    thank you very much for your tip. It was very helpful.
    I made this and it immedialety.
    Regards
    Kurt


Log in to reply