Bug 234754

Summary: Fonts:/ KIOSlave doesn't show font previews
Product: [Plasma] plasmashell Reporter: Kubuntiac <user581>
Component: generalAssignee: David Edmundson <kde>
Status: RESOLVED FIXED    
Severity: normal CC: a.samirh78, adaptee, alejandronova, bugseforuns, finex, frank78ac, kdelibs-bugs-null, mzuehlke, nate, plasma-bugs-null
Priority: NOR    
Version First Reported In: master   
Target Milestone: 1.0   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 5.23
Sentry Crash Report:

Description Kubuntiac 2010-04-18 22:20:27 UTC
Version:           1.4 (using KDE 4.4.2)
OS:                Linux
Installed from:    Ubuntu Packages

Basically, Dolphin doesn't show font previews for me.

I have "fonts" checked in the preview tab (in both Dolphin and Konqueror). I have the preview button at the top of the window turned on. The fonts are well under the max file size. Instead Dolphin just shows the generic "T" or "A" font icons.

I'm on Kubuntu Lucid AMD 64 using kde 4.4.2.
Comment 1 FiNeX 2010-08-01 15:52:18 UTC
Cannot reproduce using KDE SC 4.4.5
Comment 2 Kubuntiac 2010-08-01 17:53:37 UTC
Ah, it only seems to be happening via fonts:/
Comment 3 FiNeX 2010-08-02 15:59:22 UTC
Ok, I confirm that :-)
Comment 4 Jekyll Wu 2011-07-09 12:07:10 UTC
confirmed on 4.6.90
Comment 5 Alejandro Nova 2011-12-07 11:47:59 UTC
Confirmed on Dolphin 1.99. This is strange.
Comment 6 Jeroen van Meeuwen (Kolab Systems) 2012-08-24 16:18:33 UTC
Resetting assignee to default as per bug #305719
Comment 7 Marco Zühlke 2014-01-06 23:40:06 UTC
Confirmed using using dolphin 4.12.0 on Kubuntu.
Comment 8 Frank Reininghaus 2014-01-08 10:39:01 UTC
The same problem occurs when viewing fonts: with FolderView (whereas viewing the actual file: location where the font files are stored works fine), so it seems that this is not a Dolphin issue.
Comment 9 Kai Uwe Broulik 2019-02-04 08:24:37 UTC
Git commit fa6eaac55beb994bd850f3f080d5a3252ff12359 by Kai Uwe Broulik.
Committed on 04/02/2019 at 08:24.
Pushed by broulik into branch 'master'.

[PreviewJob] Also pass along that we're the thumbnailer when stat'ing file

Enables the KIO to react differently when being stat'd by the thumbnail KIO slave

Differential Revision: https://phabricator.kde.org/D18653

M  +1    -0    src/widgets/previewjob.cpp

https://commits.kde.org/kio/fa6eaac55beb994bd850f3f080d5a3252ff12359
Comment 10 Patrick Silva 2019-03-09 14:23:43 UTC
why is this report still open?
Comment 11 Christoph Feck 2019-03-24 11:18:26 UTC
Let's assume Patrick confirmed it's fixed by Kai's commit.
Comment 12 Patrick Silva 2019-03-24 12:07:40 UTC
It's not fixed. Preview works in /usr/share/fonts but it does not when I open fonts:/

Operating System: Arch Linux 
KDE Plasma Version: 5.15.3
KDE Frameworks Version: 5.56.0
Qt Version: 5.12.2
Comment 13 Christoph Feck 2019-03-24 13:28:04 UTC
Thanks for the update; it seems I misunderstood comment #10.
Comment 14 Ahmad Samir 2021-07-20 16:55:16 UTC
Git commit 6ae36d4b5045e6bdc86fd0d26abf5bf393d65dad by Ahmad Samir.
Committed on 20/07/2021 at 16:55.
Pushed by ahmadsamir into branch 'master'.

kio_fonts: fix the thumbnails creation by tweaking the USEntry fields

- Set the fancy name, e.g. "Foo, Bold Italic", as UDS_DISPLAY_NAME
- Set the actual file name, e.g. foo-bold.ttf, as UDS_NAME
- Set the actual file url, e.g. /usr/share/fonts/truetype/foo-bold.ttf as UDS_URL

Setting the UDS_URL fixes font thumbnail creation when using kio_fonts.
And IIUC, also avoids calling get() on "font:/" urls, the files are already
local; setting the UDS_URL makes all the font previews work on my system
at least.
FIXED-IN: 5.23

M  +11   -22   kcms/kfontinst/kio/KioFonts.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/6ae36d4b5045e6bdc86fd0d26abf5bf393d65dad