Comment 13 for bug 305394

Revision history for this message
In , Karlt (karlt) wrote :

(In reply to comment #12)
> This is on Ubuntu Intrepid (the upcoming 8.10), with fontconfig 2.6.0.
> No user specified font config, no KDE.
>
> $ grep -l rgba /etc/fonts/* /etc/fonts/conf.d/* ~/.fonts.conf | xargs ls -l
> lrwxrwxrwx 1 root root 42 2008-09-20 16:35
> /etc/fonts/conf.d/10-no-sub-pixel.conf ->
> /etc/fonts/conf.avail/10-no-sub-pixel.conf
> -rw-r--r-- 1 root root 257 2006-09-15 19:21 /etc/fonts/conf.d/no-sub-pixel.conf
> -rw-r--r-- 1 root root 256 2006-09-15 19:21 /etc/fonts/conf.d/sub-pixel.conf
>
> hm, this is strange.

Yes, I wonder where no-sub-pixel.conf and sub-pixel.conf come from. "dpkg -S
/etc/fonts/conf.d/sub-pixel.conf" may tell you, but I don't think these are
normally read by fontconfig anyway

  "every file within that directory starting with an ASCII digit (U+0030 -
   U+0039) and ending with the string ‘‘.conf’’ will be processed in
   sorted order"

"man fonts-conf" doesn't explicity say what happens with other files, but I
guess they are not read.

> $ cat /etc/fonts/conf.d/10-no-sub-pixel.conf
> <?xml version="1.0"?>
> <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
> <fontconfig>
> <!-- Enable sub-pixel rendering -->
> <match target="font">
> <edit name="rgba" mode="assign"><const>none</const></edit>
> </match>
> </fontconfig>

It seems that this may have been added in fontconfig (2.6.0-1ubuntu1).
http://changelogs.ubuntu.com/changelogs/pool/main/f/fontconfig/fontconfig_2.6.0-1ubuntu4/changelog

    - modified conf.d/Makefile.am and conf.d/Makefile.in so that
      10-antialias.conf, 10-hinting.conf, 10-hinting-medium.conf and
      10-no-subpixel.conf get linked by default to have te same default
      settings for all Ubuntu flavors. 10-hinting-full.conf and
      10-hinting-slight.conf will go into conf.avail/ .

This gives the impression that the maintainers want everything to look the
same unless this file is changed through some configuration mechanism. I'm
not familiar with Debian so I don't know what this configuration mechanism is.

The postinst file from the package includes these lines:

  db_get fontconfig/subpixel_rendering
  subpixel_rendering="$RET"

  subpixel="10-sub-pixel-rgb.conf"
  no_subpixel="10-no-sub-pixel.conf"

  if [ -h $CONFDIR/$subpixel ]; then
          rm $CONFDIR/$subpixel
  fi

  if [ -h $CONFDIR/$no_subpixel ]; then
          rm $CONFDIR/$no_subpixel
  fi

  case "$subpixel_rendering" in
  "Automatic")
          ;;
  "Always")
          ln -s $CONFAVAIL/$subpixel $CONFDIR/$subpixel
          ;;
  "Never")
          ln -s $CONFAVAIL/$no_subpixel $CONFDIR/$no_subpixel
          ;;
  esac

This is strange because it looks like it would remove the links added by the Makefile, and then possibly add them again according to some configuration.

So I assume there is a "fontconfig/subpixel_rendering" setting in a
Ubuntu-specific configuration system somewhere that currently has the value
"Never", and I assume changing that to "Automatic" would resolve the rgba problem (possibly after rerunning the postinst script with another install).