Summary: | KFontView is unable to open or install a font on Wayland | ||
---|---|---|---|
Product: | [Applications] kfontview | Reporter: | Patrick Silva <bugseforuns> |
Component: | general | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | adam, almazgaliev99, amgadelsaiegh, andydecleyre, bbaster, bizyaev, boba_fit, bribbers, bugs, cdennett, coderjoe05, demm, doankimhuy.it, eseifert, f.alexander.wilms, flying-sheep, ftefrjbhfvasf32, goeran, hasezoey, ilgaz, ivan, j.oster+5f2vykb9, jsonkoba, k2squared, kde, kde, martin.tlustos, maxpatera, mtjhrj, nate, oldherl, philipp.reichmuth, postix, public.paul.meier+kde, rdieter, reverier.xu, rm, sgtnasty, skierpage, sunspark, tgh6407, thenerdiestguy, yatian.liu.98, yvan, zawertun |
Priority: | VHI | Keywords: | wayland |
Version: | 5.27.6 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=439375 | ||
Latest Commit: | https://invent.kde.org/plasma/plasma-workspace/-/commit/5c5bba6d8d6c289d6de3536ba77edf839ba42170 | Version Fixed In: | 6.0 |
Sentry Crash Report: | |||
Attachments: | screenshot |
I have the same issue, kfontview works when using X11. KDE Plasma 5.23.3, Frameworks 5.88.0, Qt 5.15.2 (Huh, same as kernel). Graphics platform is Wayland. This is a serious bug, but I can't change its Importance. The workaround (for me, in Fedora 35 KDE spin) to run kfontview under XWayland is to enter `QT_QPA_PLATFORM=xcb kfontview` in a terminal. Then Help > About Font Viewer > Components displays "The xcb windowing system", and I can open and view .ttf font files. Any updates on this bug? It is still here in Plasma 5.23.4, KDE Frameworks 5.89, Qt 5.15.2. (In reply to Doan Kim Huy from comment #3) > Any updates on this bug? It is still here in Plasma 5.23.4, KDE Frameworks > 5.89, Qt 5.15.2. Work is ongoing. There's this merge request: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1279 which should re-enable the font manager. Previews still don't work, but, as far as I understand, that should fix installing fonts. *** Bug 448753 has been marked as a duplicate of this bug. *** Fails for me as well with 5.24.3 (wayland on Archlinux). Can reproduce under Plasma 5.24.5 on OpenSUSE TW. *** Bug 454222 has been marked as a duplicate of this bug. *** *** Bug 456311 has been marked as a duplicate of this bug. *** Starting KFontView with the environment variable QT_QPA_PLATFORM=xcb works as a workaround on a Wayland session. *** Bug 457819 has been marked as a duplicate of this bug. *** *** Bug 458149 has been marked as a duplicate of this bug. *** Still a bug in Plasma 5.26.1 Workaround: 1. run `cp /usr/share/applications/org.kde.kfontview.desktop ~/.local/share/applications/` 2. Change the `Exec` line to `Exec=QT_QPA_PLATFORM=xcb kfontview %U` *** Bug 468188 has been marked as a duplicate of this bug. *** Since Wayland is now ubiquitous and default for allmost all distributions, could somebody have a look at this bug again? Operating System: Kubuntu 23.04 KDE Plasma Version: 5.27.4 KDE Frameworks Version: 5.104.0 Qt Version: 5.15.8 Kernel Version: 6.3.0 (64-bit) Graphics Platform: Wayland Processors: 8 × Intel® Core™ i7-10510U CPU @ 1.80GHz Memory: 31.1 GiB of RAM Graphics Processor: Mesa Intel® UHD Graphics Manufacturer: Notebook Product Name: N141CU System Version: Not Applicable *** Bug 470422 has been marked as a duplicate of this bug. *** (In reply to Patrick Silva from comment #17) > *** Bug 470422 has been marked as a duplicate of this bug. *** What's interesting about this one being closed, is that I actually am on x.org, not wayland.. so, the bug affecting truetype fonts from fonts.google.com is applicable to both x.org and wayland. Curiously, truetype fonts from non-fonts.google.com sources work just fine in the viewer and font management. There must be some sort of flag or header formatting that google is doing to the file that the component doesn't know how to parse. Windows does not have the issue. Replying to myself here, the issue in comment 18 has been resolved. One needs to make sure fonts.googleapis.com is not being blocked when the zip file is being created. *** Bug 472229 has been marked as a duplicate of this bug. *** A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3290 Git commit 5c5bba6d8d6c289d6de3536ba77edf839ba42170 by Kai Uwe Broulik. Committed on 20/10/2023 at 18:20. Pushed by broulik into branch 'master'. kcms/kfontinst: Open own X connection when not running under X Ensures that it at least somewhat works on Wayland. While at it, ports xcb_image back to XImage so we only need an Xlib display. M +1 -2 kcms/kfontinst/lib/CMakeLists.txt M +46 -35 kcms/kfontinst/lib/FcEngine.cpp https://invent.kde.org/plasma/plasma-workspace/-/commit/5c5bba6d8d6c289d6de3536ba77edf839ba42170 The patch just calls Qt's X11 support directly. So I suspect it will only work under Wayland if the system is running the XWayland compatibility code. *** Bug 481371 has been marked as a duplicate of this bug. *** *** Bug 481884 has been marked as a duplicate of this bug. *** Yes. Reworking the font management to be independent of X is a whole different story. I am working on it but it will take a lot of effort, so I won't promise it will be done soon. (In reply to Kai Uwe Broulik from comment #26) > Yes. Reworking the font management to be independent of X is a whole > different story. I am working on it but it will take a lot of effort, so I > won't promise it will be done soon. When you do so, will you also consider the security issues mentioned in [1] too? :) [1] https://security.opensuse.org/2024/04/02/kde6-dbus-polkit.html#legacy-fontinst-d-bus-service |
Created attachment 139843 [details] screenshot STEPS TO REPRODUCE 1. use Wayland session 2. double-click on a font file in Dolphin or right-click on it and choose "Open with > KFontView" 3. OBSERVED RESULT I get "Could not read font." error message (see the attached screenshot) and the font can not be installed. EXPECTED RESULT KFontView is able to install a font on Wayland. SOFTWARE/OS VERSIONS Operating System: KDE neon Unstable Edition KDE Plasma Version: 5.22.80 KDE Frameworks Version: 5.84.0 Qt Version: 5.15.3 Graphics Platform: Wayland