Version: (using KDE KDE 3.3.91) Installed from: Gentoo Packages Currently KDE uses Helvetica, Courier and Times as default fonts with a size of 12. This looks very ugly and should be changed to more general choices: sans, serif and mono. Now fontconfig can handle the fontselection. Also the size should be changed to 10. Gnome and XFCE already have these defaults.
I think we should make this bug is a bit more generic. The font situation in KDE is not very consistent. There are font names all over the source of KDE. This should be cleaned up: 1.) A config option for the font resolution is missing, this should be set to 96 dpi as default, like xfce und gnome do (currently it's 72dpi) 2.) Change the default fonts in the Control Center to sans, serif and monospace, size 10 3.) Go through the KDE source and replace all font names with the values given by the control center, so all applications look consistent (e.g. in konsole) A few files I have found, which specify font names: - various *.css,*.html,*.xml,testcases kdelibs ======= - kdecore/kglobalsettings.cpp - kdecore/kconfigskeleton.h - khtml/khtmldefaults.h - khtml/khtmlview.cpp kdebase ======= - kcontrol/kdm/kdm-font.cpp - kcontrol/fonts/fonts.cpp - kcontrol/kfontinst/lib/FcEngine.cpp - kdm/config.def - kpersonalizer/keyecandypage.cpp
what makes you believe we would use 72dpi? That's nonsense, we use whatever X gets from the monitor And about font config: to your suprise: it's not available everywhere, but gentoo is free to adapt the fonts. And: you can specify in fontconfig to replace "helvetica" with whatever you like. If gentoo didn't do that for whatever reason, report it there.
Yeah that's right, KDE uses what it gets from X. But you have to search for hours to find the correct option to change it in X. So I think KDE should have an option for it and set it to 96dpi per default (not only because Windows,Gnome,XFCE4 use it, but also because it looks better). FontConfig is not available everywhere (but nearly everywhere, can you give me an example for a distribution that ships kde without fontconfig?), thats right, but the normal X-Server still understands sans,serif,monospace... Yeah, you can replace "helvetica" with whatever you like, but that's just a workaround, an ugly hack. The usual way is to set "sans", "serif", "monospace" to what you want in fontconfig.
but how many people know how to do that? I sure don't. Mandrake actually has it set up so that KDE uses antialiased fonts by default but if a) antiliasing is on by default b) someone actually _wants_ helvetica they can still use it. It would be nice if KDE would actually listen to the users and provide this by default. It doesn't really matter if you don't change the font size to 10, it doesn't really matter if you don't (and you _really_ shouldn't) change the dpi. Just make the font selected more generic, turn on antialiasing by default and get rid of those damn ugly fonts. PLEASE. I'm literally on my knees writing this now. Do i have to start crying crocodile tears too?
Yeah that's right, KDE uses what it gets from X. But you have to search for hours to find the correct option to change it in X. So I think KDE should have an option for it and set it to 96dpi per default (not only because Windows,Gnome,XFCE4 use it, but also because it looks better). -- from Heinrich It looks better for you but that doesn't mean it looks better for the rest of the world. KDE has to cater to lots of people so any "improvements" need to be kept as generic as possible to piss off as few people as possible. I say that to say this, let's keep the discussion of the wish to what's stated in the topic "KDE should use family names for fonts instead of specific fonts names by default". Other issues should be raised in other bug reports.
well, you can also add an option "Use default DPI settings given by X" or something like that
Created attachment 10101 [details] kdelibs.patch
Created attachment 10102 [details] kdebase.patch Not Fixed: - I was not sure about kpersonalizer, can I use KGlobalSettings::fixedFont() there? - krdb/themes/*: The seems define the fonts in the X format, I don't like that, if they don't change anything they should not include any font settings, otherwise they should define them with Name,Size,Weight and Style. - ksplashml/themeengine/standard/themestandard.cpp: very ugly theme, somebody needs to fix it - kdm: can you use KGlobalSettings in kdm? Are the fonts in kdm/config.def used at all?
Created attachment 10108 [details] kdenetwork.patch
SVN commit 431609 by dfaure: Use "Sans Serif" as default font instead of "helvetica" (which might not be installed) and "Monospace" instead of "courier". Patch by Heinrich Wendel. CCBUG: 98392 M +6 -6 kdecore/kglobalsettings.cpp M +1 -1 khtml/khtmlview.cpp --- trunk/KDE/kdelibs/kdecore/kglobalsettings.cpp #431608:431609 @@ -322,7 +322,7 @@ return *_generalFont; // Sync default with kdebase/kcontrol/fonts/fonts.cpp - _generalFont = new QFont("helvetica", 12); + _generalFont = new QFont("Sans Serif", 12); _generalFont->setPointSize(12); _generalFont->setStyleHint(QFont::SansSerif); @@ -338,7 +338,7 @@ return *_fixedFont; // Sync default with kdebase/kcontrol/fonts/fonts.cpp - _fixedFont = new QFont("courier", 12); + _fixedFont = new QFont("Monospace", 12); _fixedFont->setPointSize(12); _fixedFont->setStyleHint(QFont::TypeWriter); @@ -354,7 +354,7 @@ return *_toolBarFont; // Sync default with kdebase/kcontrol/fonts/fonts.cpp - _toolBarFont = new QFont("helvetica", 10); + _toolBarFont = new QFont("Sans Serif", 10); _toolBarFont->setPointSize(10); _toolBarFont->setStyleHint(QFont::SansSerif); @@ -370,7 +370,7 @@ return *_menuFont; // Sync default with kdebase/kcontrol/fonts/fonts.cpp - _menuFont = new QFont("helvetica", 12); + _menuFont = new QFont("Sans Serif", 12); _menuFont->setPointSize(12); _menuFont->setStyleHint(QFont::SansSerif); @@ -386,7 +386,7 @@ return *_windowTitleFont; // Sync default with kdebase/kcontrol/fonts/fonts.cpp - _windowTitleFont = new QFont("helvetica", 12, QFont::Bold); + _windowTitleFont = new QFont("Sans Serif", 12, QFont::Bold); _windowTitleFont->setPointSize(12); _windowTitleFont->setStyleHint(QFont::SansSerif); @@ -402,7 +402,7 @@ return *_taskbarFont; // Sync default with kdebase/kcontrol/fonts/fonts.cpp - _taskbarFont = new QFont("helvetica", 11); + _taskbarFont = new QFont("Sans Serif", 11); _taskbarFont->setPointSize(11); _taskbarFont->setStyleHint(QFont::SansSerif); --- trunk/KDE/kdelibs/khtml/khtmlview.cpp #431608:431609 @@ -2676,7 +2676,7 @@ bool printHeader = (printer->option("app-khtml-printheader") == "true"); int headerHeight = 0; - QFont headerFont("helvetica", 8); + QFont headerFont("Sans Serif", 8); QString headerLeft = KGlobal::locale()->formatDate(QDate::currentDate(),true); QString headerMid = docname;
kdelibs and kcontrol/fonts: patches applied kdebase/doc/khelpcenter: is this change because the fonts found by name are uglier than what sans-serif resolves to? Otherwise how is this a problem? Just in case, shouldn't we keep the fontnames as fallback (after sans-serif?) kpersonalizer: yes, KGlobalSettings::fixedFont() should be fine there. krdb/themes: hmm, Stephan Binner? ksplashml: isn't enough to s/helvetica/sans-serif/ there too? Or try mailing ravi@kde.org about that code. kdm: that's a question for Ossi.
Created attachment 11678 [details] konqueror-fonts.patch A patch to fix the fonts in Konqueror the same way.
regarding the css changes: I have Bitstream Vera as default font, but also the X Version of Helvetica installed, which cannot be antialiased. The Stylesheet prefers Helvetica over Bistream now. The patch lets fontconfig decide what font to use. I attached a patch to fix the fonts in konqueror as well.
ksplashml/themeengine/standard/themestandard.cpp: Yeah, but should be replaced by KGlobalSettings::genericFont() then.
> - kdm: can you use KGlobalSettings in kdm? > no > Are the fonts in kdm/config.def used at all? > sure
As far as I see the fonts are only specified in the kcontrol module, I should be able to use KGlobalSettigns there, shouldn't I?
On Tuesday 05 July 2005 11:09, Heinrich Wendel wrote: > As far as I see the fonts are only specified in the kcontrol module, I should be able to use KGlobalSettigns there, shouldn't I? What's "there"? the kcontrol module? The one for setting the fonts? I'm not sure I understand the question.
I mean the kcontrol module for kdm, but I now see that the Fonts are also in the config.def. What would be a good replacement for charter?
so what about the css changes? i'll fix themestandard myself if that's ok.
OK with me, please go ahead. I didn't notice you had an SVN account, otherwise I would have let you commit it all ;)
fixed css and ksplashml about kpersonalizer: why does it need to set the fonts at all? I don't see any reason. another one: kmail's profiles: 1.) they don't work at all here ;) 2.) the html and the default profile should use the default fonts 3.) the high contrast profile should use sans serif
Ask wolff@kde.org for details about that kpersonalizer feature, but I guess it's another attempt at fixing the exact same problem: picking up better default fonts, depending on which fonts are actually installed on the system.
wolff seems not to be very active looking at the kpersonalizer bugs. by looking at the code it does not set any different fonts at all.
it only sets antialiasing and that should be enabled always imho
Created attachment 11696 [details] kpersonalizer.patch Proposed patch to drop font settings from kpersonalizer. It still keeps the Antialising option.
david: what about the font size? the ppl on the mailinglist seem to agree that 10pt is a good default. that would be 9pt for the titlebar then.
On Wednesday 06 July 2005 20:12, Heinrich Wendel wrote: > david: what about the font size? That's a very different issue/topic IMHO, and a less obvious one (than "fontconfig does it all for us"). Might be a good idea to discuss that one on kde-core-devel.
i have no write access to kde-core-devel, but it seems that generally non-fontconfig-fonts are rendered smaller than fontconfig-fonts. So Helvetica 12pt seems to be equally large as Bitstream Vera Sans 10pt, that might be the problem.
is my patch for kpersonalizer ok?
I talked to Thiago and he said the kpersonalizer patch looked ok. About kde-core-devel: you can post there, I'll approve the post.
mutz: can you please take a look at kmail/profiles, like i described in comment #21?
Someone just added me to the CC of this bug. What kpersonalizer did so far, was to try to find "tested" fonts, that work nicely with antialiasing and select one, if antialiasing was enabled by kpersonalizer. In the time of kde2.2 this really was a problem, because helvetica (which was the KDE default) f.e. looked horrible, if antialiasing was enabled. I did not try different fonts recently, though. The patch you just applied to kpersonalizer does not clean up the code completely, the searching for fonts was done in ksysinfo.cpp. I will play around with fonts and antialiasing a bit and if all works out OK with your changes, I'll remove that legacy from ksysinfo.cpp.
Heinrich, file another bug against KMail, please.
no replies means no objections?
> no replies means no objections? To which question are you referring to? ;-)
To the mailinglist post, sorry.
Still no reply to the post on kde-core-devel, can I assume that 10pt as default is OK?
I tried to get some developers to comment on the issue, but I didn't really succeed ;) All I got was everyone's current config - most people seem to use 11pt, I realized that I in fact use 9pt (and we all checked that our DPI settings were correct). So it would seem that 10pt would be a good compromise indeed ;) I'd say go ahead.
wow, amazing, finally. my first round of defaulting kdm's fonts to 10pt dates two years back, i think. seems like it was the wrong decision to revert instead of just taking the total lack of interest for an agreement to change all of kde's defaults. :)
hehe ;) ok done :-) So two/three things are missing: 1.) krdb 2.) kmail profiles 3.) maybe an option to configure your dpi settings in the fonts dialog
Just saw the khtml commit in this week's SVN digest, and I have got a couple questions : - #define HTML_DEFAULT_VIEW_SERIF_FONT "Sans" seems awkward ; shouldn't it rather be "Serif" ? - #define HTML_DEFAULT_VIEW_FONT "Sans Serif" : am I right to think this is Konqueror's default font ? If so, shouldn't this be "Serif", too ? AFAICT, MSIE and Mozilla display in a serif face by default... Just asking ; usually I tend to be wrong, but I thought it wouldn't do harm to ask (except for some more Bugzilla spam, of course :-) > 3.) maybe an option to configure your dpi settings in the fonts dialog Seems good, as long as the current « grab the dpi from X11 » behaviour is the default. I hate GNOME's habit of ignoring my dpi settings with a vengeance.
> - #define HTML_DEFAULT_VIEW_SERIF_FONT "Sans" seems awkward ; shouldn't it rather be "Serif" ? You are right here, will fix that when i'm at home. > - #define HTML_DEFAULT_VIEW_FONT "Sans Serif" : am I right to think this is Konqueror's default font ? If so, shouldn't this be "Serif", too ? AFAICT, MSIE and Mozilla display in a serif face by default... No, the default font has to be an Sans Serif font according to the w3c > Seems good, as long as the current « grab the dpi from X11 » behaviour is the default. I hate GNOME's habit of ignoring my dpi settings with a vengeance. Yes, thatshould be the default.
Hasn't this bug been fixed now?
Another issue with font-selection arose. Is it possible, that the capability of the font to display the required charset is not checked? Please have a look at this report: http://bugs.kde.org/show_bug.cgi?id=116324
Hello! Is bug 105071 a dup of this one? If so, why are konqueror's defaults still Nimbus and not (Sans-)Serif? Users wonder why they get nice fonts all over KDE when using TT-fonts with bytecode but still ugly websites, which simply is due to konqueror having Nimbus as default and not (Sans-)Serif. Kcontrol defaults to those, so why should konqueror not?
*** Bug 105071 has been marked as a duplicate of this bug. ***
I think the bug has been fixed. 105071 looks like a suse specific problem.
In PC-BSD we use generic font familly (sans-serif, serif, monospace), and we use fontconfig to map generic font familly to a series of common fonts starting from Microsoft fonts to free fonts (ie: DejaVu). We have sofisticated antialiasing rules defined in fontconfig's config file and we don't enable antialiasing in KDE. So everybody's happy: people who don't have Microsoft installed have nice free fonts that are polished and antialiased. People who install Microsoft fonts have a hinted Tahoma everywhere in KDE, and fonts look just like Windows. You can download out configuration files here: http://ubuntuforums.org/showthread.php?t=208396 So, I highly suggest that KDE and any application use generic font family so that they use whatever font the user wants (Microsoft or Free fonts) automatically without him having to change them manually or tweak obscure config files.
Hello, As far as i know this is fixed (or so it looks like) in KDE SVN trunk r881398. If not please reopen. Thanks.