Bug 447298 - Qt 4 uses Nimbus Sans L (Helvetica) instead of DejaVu Sans (Sans Serif)
Qt 4 uses Nimbus Sans L (Helvetica) instead of DejaVu Sans (Sans Serif)
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: qt (Show other bugs)
9
All Linux
low Severity low
: ---
: ---
Assigned To: Kevin Kofler
Fedora Extras Quality Assurance
: Reopened
: 444170 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-19 08:16 EDT by Kevin Kofler
Modified: 2009-01-13 17:55 EST (History)
6 users (show)

See Also:
Fixed In Version: 4.3.4-14.fc9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-06-10 04:36:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Kevin Kofler 2008-05-19 08:16:50 EDT
Description of problem:
For some reason, kdelibs 4 is defaulting to “Sans Serif” and interpreting that 
as “Nimbus Sans L”, whereas it would be expected to default to “Sans” which is 
a FontConfig alias for “DejaVu Sans”.

Version-Release number of selected component (if applicable):
kdelibs-4.0.3-7.fc9

How reproducible:
Always

Steps to Reproduce:
1. Boot the F9 final KDE live CD and check what fonts it's using.
  
Actual results:
It says “Sans Serif” and uses “Nimbus Sans L”.

Expected results:
It says “Sans” and uses the FontConfig "Sans" alias, which resolves to “DejaVu 
Sans”.

Additional info:
Workaround: In System Settings, pick Appearance, Fonts, Adjust all fonts..., 
check Font and set it to DejaVu Sans, check Font style and set it to Regular.
Comment 1 Ngo Than 2008-05-19 08:49:54 EDT
Kevin, it looks like a fontconfig setting and should be fixed in fontconfig.
Gnome/KDE should use the font alias instead hardcoding
Comment 2 Kevin Kofler 2008-05-19 08:56:19 EDT
It actually looks like Qt is not following the fontconfig settings.

Sans Serif and Sans should be equivalent and both aliases for DejaVu Sans, 
that's how fontconfig is configured.
Comment 3 Kevin Kofler 2008-05-19 08:56:58 EDT
(And "Sans Serif" appears to actually be the right thing to use, the bug is 
that it's resolving to the wrong actual font.)
Comment 4 Rex Dieter 2008-05-19 08:57:17 EDT
/etc/fonts/fonts.conf contains aliases for "sans" and "sans serif", and calls
"sans" deprecated.

fwiw, 
gnome's control center displays the default font: Sans
both qtconfig and systemsettings display only "Sans Serif", no "Sans".

Comment 5 Kevin Kofler 2008-05-19 10:21:47 EDT
Qt 4 hardcodes a substitution which replaces "sans serif" with "helvetica", I'm 
currently building a package which disables this nonsense.
Comment 6 Rex Dieter 2008-05-19 10:37:19 EDT
Using a local quick-n-dirty no-nonsense build of qt, I can confirm it fixes this
issue.
Comment 7 Ngo Than 2008-05-19 11:33:13 EDT
Gnome uses Sans for Sans Serif, Qt uses Sans serif. I did the patch for Qt in
the past to behave like in gnome. IMO it's wrong what was doing in Gnome, so i
removed the patch.
Comment 8 Kevin Kofler 2008-05-19 13:13:54 EDT
Should be fixed in qt(4)-4.3.4-14 and qt-4.4.0-4.fc10, F8 and F9 builds 
completed, F7 and F10 still running, I'll submit updates once everything is 
built.
Comment 9 Fedora Update System 2008-05-19 13:42:44 EDT
qt-4.3.4-14.fc9 has been submitted as an update for Fedora 9
Comment 10 Fedora Update System 2008-05-19 13:43:55 EDT
qt4-4.3.4-14.fc8 has been submitted as an update for Fedora 8
Comment 11 Fedora Update System 2008-05-19 13:46:02 EDT
qt4-4.3.4-14.fc7 has been submitted as an update for Fedora 7
Comment 12 Rex Dieter 2008-05-20 10:13:23 EDT
*** Bug 444170 has been marked as a duplicate of this bug. ***
Comment 13 Fedora Update System 2008-05-21 06:55:49 EDT
qt-4.3.4-14.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update qt'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-4163
Comment 14 Fedora Update System 2008-05-30 22:11:02 EDT
qt4-4.3.4-14.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 15 Fedora Update System 2008-05-30 22:14:34 EDT
qt4-4.3.4-14.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 16 Fedora Update System 2008-05-30 22:15:01 EDT
qt-4.3.4-14.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 17 Julian Sikorski 2008-06-10 04:33:50 EDT
Hmm, Serif looks OK now, but Sans Serif still picks Nimbus Sans L instead of
DejaVu LGC sans. Do I need to delete some config files for the change to take
effect?
Comment 18 Julian Sikorski 2008-06-10 04:36:22 EDT
OK, nevermind, there were some substitutions still lurking around in my
~/.config/Trolltech.conf.
Comment 19 Fedora Update System 2008-07-26 01:56:18 EDT
qt-4.3.4-14.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 20 Rex Dieter 2009-01-12 10:26:24 EST
Woo, looks like
0263-fix-fontconfig-handling.diff
in latest qt-copy patches may finally address this upstream, so can try/test removing our local qt-x11-opensource-src-4.3.4-no-hardcoded-font-aliases.patch

I'll test it out.
Comment 21 Alexei Podtelezhnikov 2009-01-12 20:06:39 EST
Are we making progress on bug 355271,
or http://bugs.kde.org/show_bug.cgi?id=57485 ?
That'd be cool and highly anticipated!
Comment 22 Kevin Kofler 2009-01-13 09:24:31 EST
That's a completely separate issue, please comment in bug 355271, not here. (And no, AFAIK it's not being worked on.)
Comment 23 Rex Dieter 2009-01-13 10:01:16 EST
qt-copy patch tests out good here, local hack/patch removed in qt-4.4.3-10
Comment 24 Alexei Podtelezhnikov 2009-01-13 17:40:33 EST
Re: Comment #22
I am sorry I pointed out that this bug that you reported was likely related to the bug I reported a year earlier. Just like in my bug 355271, you first didn't realize that the problem is because Qt essentially ignores fontconfig. And this is exactly the same conclusion I reached in te earlier bug. 

So I beg to differ. The root cause of the problems is the same!

Note You need to log in before you can comment on or make changes to this bug.