Package: fontconfig
Version: 2.11.0-5
Severity: wishlist
Tags: patch

The GNUstep art backend (gnustep-backN-art) uses the system fonts in
the "nfont" format; they are generated by mknfonts.tool in
gnustep-back-common's postinst based on the info fc-list provides.

However, if a font package is installed or removed, currently there is
no way to reflect that.  We can't use file triggers in the way
fontconfig does, because dpkg does not guarantee the order in which it
processes triggers (gnustep-back-common's triggers may be processed
before fontconfig's which would be useless).  If fontconfig activates
an explicit dpkg trigger when it regenerates the cache, we can use it
to take action accordingly.

Trivial patch attached.

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 3.14-1-686-pae (SMP w/1 CPU core)
Locale: LANG=bg_BG.UTF-8, LC_CTYPE=bg_BG.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages fontconfig depends on:
ii  fontconfig-config  2.11.0-5
ii  libc6              2.18-7
ii  libexpat1          2.1.0-5
ii  libfontconfig1     2.11.0-5
ii  libfreetype6       2.5.2-1

fontconfig recommends no packages.

fontconfig suggests no packages.

-- debconf information:
* fontconfig/hinting_type: Autohinter
* fontconfig/enable_bitmaps: false
* fontconfig/subpixel_rendering: Never
--- fontconfig-2.11.0.orig/debian/fontconfig.postinst
+++ fontconfig-2.11.0/debian/fontconfig.postinst
@@ -6,6 +6,7 @@ if [ "$1" = triggered ]; then
   # Force regeneration of all fontconfig cache files.
   mkdir -p /var/cache/fontconfig
   fc-cache -s -v 1>/var/log/fontconfig.log 2>&1 || printf "fc-cache failed.\nSee /var/log/fontconfig.log for more information.\n"
+  dpkg-trigger fontconfig-cache-regenerated
   exit 0
 fi
 
@@ -17,4 +18,5 @@ if [ "$1" = configure ]; then
   printf "Regenerating fonts cache... "
   fc-cache -s -f -v 1>/var/log/fontconfig.log 2>&1 || (printf "failed.\nSee /var/log/fontconfig.log for more information.\n"; exit 1)
   printf "done.\n"
+  dpkg-trigger fontconfig-cache-regenerated
 fi

Reply via email to