[Pkg-fonts-devel] Bug#485387: ttf-vlgothic: Please support alternative to ttf-japanese-gothic.ttf
Package: ttf-vlgothic
Version: 20080429-1
Severity: minor
Tags: patch
We Japanese Font pakcage maintainers devised the policy of the Japanese font[0].
And registered this as Debian policy.
Please support it.
Best regards,
Nobuhiro
[0]: http://wiki.debian.org/Fonts/JapanesefontpkgProposal
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.24-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages ttf-vlgothic depends on:
ii defoma 0.11.10-0.2 Debian Font Manager -- automatic f
ttf-vlgothic recommends no packages.
-- no debconf information
diff --git a/ttf-vlgothic-20080429/debian/ttf-vlgothic.postinst b/ttf-vlgothic-20080429/debian/ttf-vlgothic.postinst
index 22d9bd9..1d48349 100644
--- a/ttf-vlgothic-20080429/debian/ttf-vlgothic.postinst
+++ b/ttf-vlgothic-20080429/debian/ttf-vlgothic.postinst
@@ -2,10 +2,24 @@
# postinst script for ttf-vlgothic
#
# see: dh_installdeb(1)
+#
+# Add support alternatives by Nobuhiro Iwamatsu
set -e
PACKAGE_NAME=ttf-vlgothic
+# font alternatives
+ALT_NAME="ttf-japanese-gothic.ttf"
+FONT_ENTRY="/usr/share/fonts/truetype/vlgothic/VL-Gothic-Regular.ttf"
+
+add_font_entry ()
+{
+ update-alternatives --install \
+ /usr/share/fonts/truetype/ttf-japanese-gothic.ttf \
+ $ALT_NAME \
+ $FONT_ENTRY \
+ 60
+}
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
@@ -41,6 +55,9 @@ case "$1" in
echo ""
fi
+ # alternatives
+ add_font_entry
+
;;
abort-upgrade|abort-remove|abort-deconfigure)
diff --git a/ttf-vlgothic-20080429/debian/ttf-vlgothic.prerm b/ttf-vlgothic-20080429/debian/ttf-vlgothic.prerm
index e210647..418d771 100644
--- a/ttf-vlgothic-20080429/debian/ttf-vlgothic.prerm
+++ b/ttf-vlgothic-20080429/debian/ttf-vlgothic.prerm
@@ -9,6 +9,10 @@ PACKAGE_NAME=ttf-vlgothic
DEFOMA_HINTS_FILE=/etc/defoma/hints/$PACKAGE_NAME.hints
FONTCONF_FILE=64-ttf-vlgothic.conf
+# font alternatives
+ALT_NAME="ttf-japanese-gothic.ttf"
+FONT_ENTRY="/usr/share/fonts/truetype/vlgothic/VL-Gothic-Regular.ttf"
+
# summary of how this script can be called:
# * <prerm> `remove'
# * <old-prerm> `upgrade' <new-version>
@@ -20,18 +24,30 @@ FONTCONF_FILE=64-ttf-vlgothic.conf
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
-
-case "$1" in
- remove|upgrade|deconfigure)
-
+font_cache_func()
+{
# fontconfig
if [ -e /etc/fonts/conf.d/${FONTCONF_FILE} ]; then
- rm /etc/fonts/conf.d/${FONTCONF_FILE}
- if [ -x /usr/bin/fc-cache ]; then
- /usr/bin/fc-cache update
- fi
+ rm /etc/fonts/conf.d/${FONTCONF_FILE}
+ if [ -x /usr/bin/fc-cache ]; then
+ /usr/bin/fc-cache update
+ fi
fi
+}
+
+case "$1" in
+ upgrade|deconfigure)
+ # fontconfig
+ font_cache_func
+
+ ;;
+ remove) # remove only
+ # fontconfig
+ font_cache_func
+
+ # alternative
+ update-alternatives --remove $ALT_NAME $FONT_ENTRY
;;
failed-upgrade)
Reply to: