This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Change the font used by the news plasmoid

Tags: None
(comma "," separated)
User avatar
l3u
Registered Member
Posts
38
Karma
0
OS
Can the default font for the news plasmoid be changed? Btw as it uses qt-webkit, can the default fonts for qt-webkit be set somewhere? Since the upgrade to qt(-webkit) 4.8.1, my news plasmoids look like so:
Image
At least, it would be fine to be able to select a font that will be anti-aliased.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
From what I can tell, this can't be changed directly. However it could be influenced by a number of factors, including the default font as set in System Settings > Application Appearance > Fonts.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
l3u
Registered Member
Posts
38
Karma
0
OS
I don't think it's influenced by the default KDE appearance settings, as all fonts I have selected there are being anti-aliased and other font familys.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
If you are aware of some CSS, you should be able to fix this. It does require modifying your current Plasma theme however.

Find "stylesheets/news.css" (which should be somewhere like /usr/share/apps/desktoptheme/default/stylesheets/news.css) and alter it to set a better font.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
l3u
Registered Member
Posts
38
Karma
0
OS
Thanks, this worked :-)

I didn't change /usr/share/apps/desktoptheme/default/stylesheets/news.css, because this would be overwritten by any update. After having had a short look at the sources, I found that the news plasmoid searches not only for this location, but for other standard config files, so I could simply create ~/.kde4/share/apps/desktoptheme/default/stylesheets/news.css according to my needs.

Works fine!

But at this point, there's another (more generic) question: the news plasmoid uses a QWebFrame to display HTML. So do other applications, like KMail for the message that is displayed when no directory is selected. Is there a way to set default fonts for the whole QWebkit framework? So that all QWebFrames, etc. will use them by default?

Seems like "Times New Roman" is actually hard-coded in QWebkit, even before the fonts set by the desktop environment.
User avatar
einar
Administrator
Posts
3402
Karma
7
OS
In fact, I'm unsure if this is a QtWebKit bug or a bug in the applet itself.


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python
User avatar
l3u
Registered Member
Posts
38
Karma
0
OS
I don’t think this is a bug – I rather think this is a lack of a feature: a GUI-driven possibility to set the standard fonts used by QWebkit for the whole dedsktop environment.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]