schnitzeltony / meta-qt5-extra

OE layer for desktop environments based on Qt5 (KDE KF5+Plasma+Apps / lirios / lxqt / lumina)
MIT License
29 stars 32 forks source link

No fonts in Qt5 apps #53

Closed megastallman closed 6 years ago

megastallman commented 6 years ago

Hi everyone!

After building KDE, I've noticed that all Qt5 apps have no fonts. But Gtk2/3 apps are fine.

I've got the following error trying to run Konsole via Xfce4-terminal:

QFontDatabase: Cannot find font directory /usr/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.

Installed most of the fonts I've found, but they reside in /usr/share/fonts , not lib.

sh-4.4# cd /usr/lib
sh-4.4# ln -s /usr/share/fonts .
sh-4.4# konsole
qt.qpa.xcb: xcb_shm_create_segment() failed for size 949760
sh-4.4# konsole
qt.qpa.xcb: xcb_shm_create_segment() failed for size 949760

And I still get a working Konsole with no fonts, so I can't just see what is happening. The same happens with Gwenview and panel.

Thanks in advance!

schnitzeltony commented 6 years ago

Maybe something like

PACKAGECONFIG_FONTS = "fontconfig" as in [1]

or

DISTRO_FEATURES += "kde" in your local.conf

helps.

[1] https://github.com/schnitzeltony/meta-misc/blob/master/appends-packageconfig/meta-qt5/qtbase_%25.bbappend

schnitzeltony commented 6 years ago

Forgot to mention: For the solution

DISTRO_FEATURES += "kde"

you need a very recent meta-qt5.

megastallman commented 6 years ago

Thanks much! It works! Now I have fonts.