Red Hat Bugzilla – Bug 490888
All fonts are monospace after upgrade to fontconfig-2.6.99.behdad-3
Last modified: 2009-05-28 05:24:43 EDT
Description of problem:
Today I did 'yum update' on my Rawhide KVM guest. About 20 packages were updated, among them was fontconfig. After reboot to get the new kernel, all fonts in GDM were monospaced and without antialiasing. After logging in into GNOME everything was monospaced and no AA too (menus, window titles, gnome-terminal, ...). I thought I had lost my Preferences -> Appearance -> Fonts settings, so I went there to check, but all fonts appeared the same.
The problem was fixed it by running 'fc-cache -r' and logging out and back in.
Version-Release number of selected component (if applicable):
The upgrade was from:
Not sure. I haven't tried downgrading and repeating the upgrade yet.
Steps to Reproduce:
1. Update fontconfig
2. Reboot (although relogin would probably be sufficient)
All fonts are monospace and without antialiasing.
Font should look as they did before the upgrade.
I suspect the bug is in fontconfig's postinstall script where it does:
rm -f /var/cache/fontconfig/????????????????????????????????.cache-2
But at least on my system the number of question marks does not correspond to the actual filename lengths of the files in that directory. E.g.
(the "-x86-64" is not accounted for)
The rm is there to cleanup earlier naming convention where there was no arch in the file name. So that's not the issue.
Did the update also update any font packages?
Ok, I understand the bug now. Working on a fix.
Author: Behdad Esfahbod <firstname.lastname@example.org>
Date: Wed Mar 18 19:28:52 2009 -0400
[fc-lang] Make LangSet representation in the cache files stable
Fontconfig assigns an index number to each language it knows about.
The index is used to index a bit in FcLangSet language map. The bit
map is stored in the cache.
Previously fc-lang simply sorted the list of languages and assigned
them an index starting from zero. Net effect is that whenever new
orth files were added, all the FcLangSet info in the cache files would
become invalid. This was causing weird bugs like this one:
With this commit we fix the index assigned to each language. The index
will be based on the order the orth files are passed to fc-lang. As a
result all orth files are explicitly listed in Makefile.am now, and
new additions should be made to the end of the list. The list is made
to reflect the sorted list of orthographies from 2.6.0 released followed
by new additions since.
This fixes the stability problem. Needless to say, recreating caches
is necessary before any new orthography is recognized in existing fonts,
but at least the existing caches are still valid and don't cause bugs
like the above.
Requesting tag now.
(In reply to comment #4)
> Built fontconfig-2.6.99.behdad.20090318-1.fc11
WORKSFORME (had similar issue reported with 2.6.99.behdad-3.fc11.x86_64).
(In reply to comment #6)
> (In reply to comment #4)
> > Built fontconfig-2.6.99.behdad.20090318-1.fc11
> WORKSFORME (had similar issue reported with 2.6.99.behdad-3.fc11.x86_64).
Cool. So you had broken fonts, updated, and they were not broken anymore?
(In reply to comment #7)
> (In reply to comment #6)
> > (In reply to comment #4)
> > > Built fontconfig-2.6.99.behdad.20090318-1.fc11
> > WORKSFORME (had similar issue reported with 2.6.99.behdad-3.fc11.x86_64).
> Cool. So you had broken fonts, updated, and they were not broken anymore?
Something close to that. I have other fonts (not included in Fedora anymore) installed and my font preferences set in /etc/fonts/local.conf. But on update to fontconfig-2.6.99.behdad-3.fc11.x86_64, the custom settings doesn't have any effects, and my monospaced fonts revert to stock Fedora's.
*** Bug 491604 has been marked as a duplicate of this bug. ***