Closed pagiraud closed 7 years ago
The missing icons are from 'font awesome' Cantata should have installed a copy of fontawesome-4.3.0.ttf into /usr/share/cantata/fonts Is it not there?
It is there! /usr/share/cantata/fonts/fontawesome-4.3.0.ttf is present on my system. Its content seems correct (MD5 sum: 706450d7bba6374ca02fe167d86685cb ) When I launch Cantata from command line I get this:
Icon theme "cantata" not found. Failed to compute left/right minimum bearings for "FontAwesome" Failed to compute left/right minimum bearings for "FontAwesome" Failed to compute left/right minimum bearings for "FontAwesome" Failed to compute left/right minimum bearings for "FontAwesome" Failed to compute left/right minimum bearings for "FontAwesome" Failed to compute left/right minimum bearings for "FontAwesome" Failed to compute left/right minimum bearings for "FontAwesome" Failed to compute left/right minimum bearings for "FontAwesome"
Well I guess the error is Qt's handing of font-awesome:
Failed to compute left/right minimum bearings for "FontAwesome"
Which version of Qt are you using?
Could you try downloading the latest (4.7) from http://fontawesome.io/ Then save this as /usr/share/cantata/fonts/fontawesome-4.3.0.ttf (Cantata looks for a specific version)
I'm using Qt 5.7.0. I replaced the 4.3 ttf file with the newer one, keeping the 4.3 filename as you asked: no change.
Didn't think it'd make any difference - but was worth a try. Are you self-compiling Cantata? If so, can you please checkout my madrigal project - https://github.com/CDrummond/madrigal This is a OpneHome client - and not MPD client. But, it also uses font-awesome icons. But it uses a slightly different font, and embeds the font in the application. I'd be interested to know if the icons work for this app. When you start it (under KDE at least) there should be a menu icon on the right-hand side. This will be a firefox style 3 bars icon. Can you please try this, and let me know if you see the icon? If so, then I can convert Cantata to use a similar method.
My OBS bug was closed because supposed upstream. Just to test, I changed the font-awesome file for symbol.ttf from my wine directory: I copied it to /usr/share/cantata/fonts/ and renamed it fonts-awesome-4.3.ttf Now, when I launch Cantata from command line I just have
Icon theme "cantata" not found.
And I get some random icons in Cantata. So maybe it comes from Qt or the font itself…
Any chance you can try Madrigal? I know it means compiling an app you wont use - but might help with the font issue.
Or perhaps try copying https://github.com/CDrummond/madrigal/blob/master/icons/fontawesome-webfont.ttf to /usr/share/cantata/fonts/fontawesome-4.3.0.ttf
I just compiled Madrigal. I had to install a bunch of devel files to pass cmake and then had a few warnings during make but it worked. I launched Madrigal and then… well you can see by yourself. Something must have changed between Qt 5.6 and Qt 5.7 about fonts handling. Edit: It goes without saying that when I launch Madrigal from the command line I get several
Failed to compute left/right minimum bearings for "FontAwesome"
I am having the same problem here. I am using: Ubuntu 16.4 Qt 5.5.1 current master checkout (96a3155e82) fonts-font-awesome package installed
Did not try to download from http://fontawesome.io/ yet. In my case korean fonts are shown instead of icons.
Just updated to 16.10 - and now seeing this issue!!!!! :-(
OK, did a clean build - and it is now working. Can you please try re-building Cantata with a clean build folder - e.g. re-run CMake, make install, etc.
Did an clean build but it did not change anything. I still only see Korean characters instead of icons.
Now it works! Only did a clean build without an install. Now I see icons. Did not know that Cantata is such a beautiful app! Thanks! ;-)
I accepted a pull request about a year ago to allow specifying location of /usr/share files. Looks like this location compiled into the code is not updated unless you do a complete clean build. Might need to look into reverting this change - or at least making it not break things!
Do you think this is the same issue as mine? I mean, when I built Madrigal, it was necessarily a clean build…
Don't think so. My issue, and padertux's, was due to the build having an incorrect path listing to the font awesome ttf file. Madrigal embeds the ttf into the binary. So, if Madrigal is not working then its not a path issue.
I investigated a bit using your Madrigal project, and now I'm quite convinced this is a bug from Qt 5.7. Playing with the hexadecimal references of characters in core/monoicon.h and with fonts, I tried to change and print the "Show Lyrics" icon. First, I tried with 0xf266b from the Linux Libertine font and got what I expected: So I thought Qt 5.7 was unable to print characters from purely iconic fonts. But then I tried with 0xf56 from MarVoSym and 0xe033 from OpenSymbol… every thing worked, as you can see. But I noticed one thing : MarvoSym and OpenSymbol use at least some characters from the subset used by qfontengine to compute left and right bearings: '(', 'C', 'F', 'K', 'V', 'X', 'Y', ']', '_', 'f', 'r', '|', 127, 205, 645, 884, 922, 1070, 12386 (Qt seems to use decimal system and not hexadecimal to reference characters), where FontAwesome has none! It explains the error message I reported previously (do you have it by the way?). It was introduced in Qt 5.6, if I'm right, but a diff between qfontengine.cpp 5.6.2 and 5.7.0 shows changes around this function. They are not documented in the changelog so I didn't see them at first sight, but I think the problem lies here. What do you think about that?
Thanks for the investigation. Does look like a Qt issue. I might be able to hack the FontAwesome ttf file so that those characters point to mapped characters - I had some code that altered TTFs years ago, will see if I can find it.
Downloaded Qt5.7 from qt.io - and everything is working, all icons displayed. Sorry, but this is looking like an issue on your system.
Thank you for trying… I'm trying to know if other people using Tumbleweed have this problem too.
Icon theme "cantata" not found.
Have you tried installing / copying the icon theme to /usr/share/icons if Qt is meant to be looking for icon themes from standard locations thats likely where it should be looking.
Ignore that message - not sure why it comes up - it is not related to this issue. The missing icons are not from a theme, they're from font-awesome. This is a TTF font containing only icons. Cantata (and Madrigal) has its own icon engine for font awesome icons.
Has the build on opensuse been updated? Does it now build? Still have the issue? Not sure what to do about this - as it is working as expected here.
The build on OpenSuse has been updated… but still no luck. On the mailing list, at least one guy installed Cantata just to test and the icons displayed fine on his computer… I tried to install a fresh Opensuse in VirtualBox, but I wasn't able to start X, so I'm not able to say if I can reproduce the bug. If I had snapper installed, I could try to come back to a previous snapshot, but I formatted my root partition in ext4 instead of Btrfs especially to disable snapper. I tried many things since my last message, but nothing worked. Maybe I should really reinstall, but this is the only bug I have, and I don't have time to do that now. Maybe you should leave it open but no see this as a blocker. I would say that, if by the end of november I'm still the only user affected and don't give some news, you should consider the issue as not reproducible and close it.
Its now december, so closing.
Since this morning, icons are back, both in Cantata and Madrigal. I didn't do anything particular, but yesterday there were some updates in libqt5:
libqt5-qtbase (5.7.0 -> 5.7.1) libqt5-qtdeclarative (5.7.0 -> 5.7.1) libqt5-qtgraphicaleffects (5.7.0 -> 5.7.1) libqt5-qtimageformats (5.7.0 -> 5.7.1) libqt5-qtlocation (5.7.0 -> 5.7.1) libqt5-qtmultimedia (5.7.0 -> 5.7.1) libqt5-qtquickcontrols (5.7.0 -> 5.7.1) libqt5-qtscript (5.7.0 -> 5.7.1) libqt5-qtsensors (5.7.0 -> 5.7.1) libqt5-qtserialport (5.7.0 -> 5.7.1) libqt5-qtsvg (5.7.0 -> 5.7.1) libqt5-qttools (5.7.0 -> 5.7.1) libqt5-qtwebchannel (5.7.0 -> 5.7.1) libqt5-qtwebengine (5.7.0 -> 5.7.1) libqt5-qtwebkit (5.7.0 -> 5.7.1) libqt5-qtwebsockets (5.7.0 -> 5.7.1) libqt5-qtx11extras (5.7.0 -> 5.7.1) libqt5-qtxmlpatterns (5.7.0 -> 5.7.1)
I don't know where the problem came from, but this issue is really solved now. Thank you for this amazing software.
For what it's worth, I just installed cantata built from source on Gentoo testing branch against QT 5.7.1 and have the same issue
Failed to compute left/right minimum bearings for "FontAwesome"
Reading this thread is not clear to me how to solve this.
Just a quick addition: it seems that my system is using the wrong fontawesome perhaps, the one distributed by texmf
$ lsof -p 2072 | grep awesome
cantata 2072 user mem REG 259,2 173219 1449416 /usr/share/texmf-dist/fonts/type1/public/fontawesome/FontAwesome.pfb
$
Moved the pfb file out of the way and now cantata loads the right file. Perhaps this was the same issue experienced by pagiraud?
I don't know if this bug should be reported here, to KDE or to my distribution bug tracker, so please apology if this is not the right place. As you can see in the screenshot, some icons are missing and there are empty rectangles or the letters fi or fl instead. This appeared when I upgraded plasma to the 5.8 version. I'm using Opensuse Tumbleweed 64 bits, with Cantata provided by the KDE:Extra repository