FS#25499 - [fontconfig] 29-replace-bitmap-fonts.conf thwarts gsfonts
Attached to Project:
Arch Linux
Opened by Ian Abbott (ijabbott) - Wednesday, 10 August 2011, 20:27 GMT
Last edited by Jan Alexander Steffens (heftig) - Friday, 11 October 2013, 14:44 GMT
Opened by Ian Abbott (ijabbott) - Wednesday, 10 August 2011, 20:27 GMT
Last edited by Jan Alexander Steffens (heftig) - Friday, 11 October 2013, 14:44 GMT
|
Details
Description:
The gsfonts package provides fonts from URW similar to the standard set of PostScript fonts with the same metrics. The /etc/fonts/conf.d/29-replace-bitmap-fonts.conf file provided by Arch Linux's fontconfig package is sub-optimal when the gsfonts package is installed. If gsfonts is installed, the ideal substitutes for Helvetica, Times and Courier are as follows: "Helvetica" -> "Nimbus Sans L" "Times" -> "Nimbus Roman No9 L" "Courier" -> "Nimbus Mono L" The 30-metric-aliases.conf file would perform the above substitutions (unless the xorg-fonts-type1 package provides Courier or the real Adobe fonts are installed). However, the 29-replace-bitmap-fonts.conf file thwarts this as it gets in before 30-metric-aliases.conf. 29-replace-bitmap-fonts.conf replaces Helvetica, Times and Courier as follows: "Helvetica" -> "Arial", "Liberation Sans", or "sans-serif" "Times" -> "Times New Roman", "Liberation Serif", or "serif" "Courier" -> "Courier New", "Liberation Mono", or "monospace" I humbly suggest that the above replacement lists for "Helvetica", "Times" and "Courier" should begin with "Nimbus Sans L", "Nimbus Roman No9 L" and "Nimbus Mono L" respectively. Alternatively, the existing 29-replace-bitmap-fonts.conf could be moved to 31-replace-bitmap-fonts.conf to achieve the same thing. Additional info: * package version(s) fontconfig 2.8.0-1 gsfonts 1.0.7pre44-2 * config and/or log files etc. /etc/fonts/conf.d/29-replace-bitmap-fonts.conf /etc/fonts/conf.d/30-metric-aliases.conf Steps to reproduce: # pacman -S fontconfig # pacman -S gsfonts # pacman -S ttf-liberation # fc-match Helvetica # fc-match Times # fc-match Courier Actual results: # fc-match Helvetica LiberationSans-Regular.ttf: "Liberation Sans" "Regular" # fc-match Times LiberationSerif-Regular.ttf: "Liberation Serif" "Regular" # fc-match Courier LiberationMono-Regular.ttf: "Liberation Mono" "Regular" Expected results: # fc-match Helvetica n019003l.pfb: "Nimbus Sans L" "Regular" # fc-match Times n021003l.pfb: "Nimbus Roman No9 L" "Regular" # fc-match Courier n022003l.pfb: "Nimbus Mono L" "Regular" |
This task depends upon
Closed by Jan Alexander Steffens (heftig)
Friday, 11 October 2013, 14:44 GMT
Reason for closing: Fixed
Additional comments about closing: fontconfig 2.11.0
Friday, 11 October 2013, 14:44 GMT
Reason for closing: Fixed
Additional comments about closing: fontconfig 2.11.0
[andyrtr@workstation64 ~]$ fc-match Helvetica
arial.ttf: "Arial" "Normal"
[andyrtr@workstation64 ~]$ pacman -Q fontconfig gsfonts
fontconfig 2.10.2-1
gsfonts 1.0.7pre44-3
[andyrtr@workstation64 ~]$ fc-match Helvetica
arial.ttf: "Arial" "Normal"
[andyrtr@workstation64 ~]$ fc-match Times
times.ttf: "Times New Roman" "Normal"
[andyrtr@workstation64 ~]$ fc-match Courirer
DejaVuSans.ttf: "DejaVu Sans" "Book"
If there's still something to do I suggest to discuss this on the fontconfig mailing list as all distributions should be affected.
A local browser test works well here (http://zipcon.net/~swhite/docs/computers/browsers/fonttest.html).
btw: 2.10.92 coming soon to our repos doing more major rework.
There is no point discussing it on the fontconfig mailing list because the 29-replace-bitmap-fonts.conf is not part of upstream fontconfig. AFAICT it only appears in Arch Linux so this is an Arch bug, not an upstream bug.
Either of the two solutions outlined in the original bug report would work.
$ fc-match Helvetica
helvR12-ISO8859-1.pcf.gz: "Helvetica" "Regular"
Which makes Github use this horrible bitmap font!
I've symlinked "ln -s /etc/fonts/conf.avail/70-no-bitmaps.conf /etc/fonts/conf.d/" to get proper browser font (Xombrero webkit gtk2) rendering with the new release. It doesn't have any effect on FF it seems.
with symlink: [andyrtr@workstation64 trunk]$ fc-match Helvetica
n019003l.pfb: "Nimbus Sans L" "Regular"
without symlink: [andyrtr@workstation64 trunk]$ fc-match Helvetica
helvR12-ISO8859-1.pcf.gz: "Helvetica" "Regular"
Can we live with that results?
Problem with that was that I could no longer use the Terminus font in xfce4-terminal. ('fc-match terminus' would point to DejaVu Sans.)
Not sure where this leaves us...
I reinstated the replacement in the [testing] package. Select the Nimbus fonts (or the Freefonts) directly instead of using the PostScript alias, if you want them.
Recommend closing with "Won't fix."
I'm not really sure why 29-replace-bitmap-fonts.conf is needed at all (seems like a poorly considered hack), but if one has deliberately removed the symlink to so solve a problem, it would be nice if it didn't reappear every time one upgraded the fontconfig package. Maybe the PKGBUILD could check if the symlink has been previously removed and not install it in that case. Something like:
install -m644 "$srcdir/29-replace-bitmap-fonts.conf" "$pkgdir/etc/fonts/conf.avail"
pushd $pkgdir/etc/fonts/conf.d
if [ ! -f /etc/fonts/conf.avail/29-replace-bitmap-fonts.conf -o \
-f /etc/fonts/conf.d/29-replace-bitmap-fonts.conf ]; then
ln -s /etc/fonts/conf.avail/29-replace-bitmap-fonts.conf .
fi
popd
Or bring it upstream to solve this in a proper way. Other distributions should be affected as well.
That's what LFS also recommends. Back to vanilla config wherever possible. Would this break anything heavily?