March 16, 2005
Fontconfig fun
As is common when I upgrade fontconfig, all of my fonts changed appearance fairly randomly, using the wrong kind of hinting, selecting the wrong fonts, and generally looking very ugly. The usual problem is that debconf runs and decides something different to how I had it configured before, although I can’t quite see why (possibly related to losing my debconf cache to HDD corruption some time ago…). This time round, after upgrading from 2.2.3 to 2.3.0, I ran dpkg-reconfigure fontconfig
and successfuly set it back to native hinting, and things looked roughly like they did before, with one major exception: some websites which requested serif fonts, and had previously used Bitstream Vera Serif, now used some other random font which hinted very badly and gave me coloured fringes, and looked generally horrible. The problem also applied in some cases to other sans and mono fonts on websites too, but not all of them.
After a while of using Firefox’s excellent Web Developer Extension to fiddle with the CSS, reading /etc/fonts/fonts.conf
, and stracing firefox to see what fonts it was actually loading, I managed to work out that the change was due to this commit in fontconfig CVS. Rather than the old choice of just looking for Times New Roman to provide Times, Arial to provide Helvetica, and Courier New to provide Courier, the fonts.conf in 2.3.0 binds these to the Postscript Type1 Nimbus family of fonts that come in the gsfonts
package, which 2.3.0 is now able to read even without having gsfonts-x11
installed. Previously websites which requested Times, "Times New Roman", serif
fell back to Bitstream Vera Serif (I don’t have the Microsoft fonts installed) and looked fine, but now are using Nimbus Roman 9 to provide Times, causing the change in appearance.
My first attempt to fix this was to enable the autohinter on these fonts, rather than relying on the native hinting, which works well for the Bitstream Vera and Microsoft fonts, but not otherwise. It was better, but still not that good… So I just overrode the mapping of Times/Helvetica/Courier with my own mappings to the Bitstream Vera fonts. Which worked brilliantly, you can download my ~/.fonts.conf here. I left the autohinting stuff in because occasionally pango might use a glyph from the Nimbus fonts anyway. It also includes a snippet to put the fixed font back even if you have bitmapped fonts turned off, which dato was asking about in #debian-devel.
Sleeping from 7am to 1pm, and the fact I have no food in my room, cupboard or fridge, is probably not helping my cold, so I still feel utterly terrible… *sniff*
3 responses to “Fontconfig fun”
Leave a Reply
Calendar
M | T | W | T | F | S | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
Links
Archives
- April 2024
- February 2024
- March 2023
- November 2022
- May 2022
- February 2022
- June 2021
- January 2021
- August 2019
- October 2018
- July 2017
- May 2010
- October 2009
- August 2009
- July 2009
- March 2009
- January 2009
- July 2008
- June 2008
- April 2008
- May 2007
- January 2007
- December 2006
- June 2006
- April 2006
- March 2006
- November 2005
- October 2005
- September 2005
- August 2005
- July 2005
- May 2005
- April 2005
- March 2005
Can you send me the font.conf file? I can’t link to http://www.hadesian.co.uk/files/fonts.conf. Thanks!
I’ve been struggling with a similar problem: I can’t get my .fonts.conf right. It seems that the link you posted here has rotted… It would be great if you could repost it.
Fixed the link.