From 7efb402be9f0deff93c938b5023d89b7e0253c87 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sun, 3 Feb 2008 00:26:11 +0000 Subject: Prevent the arphic font from becoming the preferred 'sans' and 'serif' fonts --- ttf-arphic-uming/build/ttf-arphic-uming.SlackBuild | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'ttf-arphic-uming') diff --git a/ttf-arphic-uming/build/ttf-arphic-uming.SlackBuild b/ttf-arphic-uming/build/ttf-arphic-uming.SlackBuild index 8233cc07..d7459887 100755 --- a/ttf-arphic-uming/build/ttf-arphic-uming.SlackBuild +++ b/ttf-arphic-uming/build/ttf-arphic-uming.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh # $Id$ -# Copyright (c) 2007 Eric Hameleers +# Copyright (c) 2007,2008 Eric Hameleers # All rights reserved. # # Permission to use, copy, modify, and distribute this software for @@ -35,6 +35,9 @@ # 0.1.20060928-2: 18/Nov/2007 by Eric Hameleers # * Set ARCH to 'noarch' since a font is archtecture- # independent. +# 0.1.20060928-3: 02/Feb/2008 by Eric Hameleers +# * Don't let fontconfig use the font as the default for +# sans and serif font display. # # Run 'sh ttf-arphic-uming.SlackBuild --cleanup' to build a Slackware package. # The package (.tgz) plus descriptive .txt file are created in /tmp . @@ -47,7 +50,7 @@ PRGNAM=ttf-arphic-uming VERSION=${VERSION:-0.1.20060928} ARCH=noarch -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} DOCS="CONTRIBUTERS README* license" @@ -139,9 +142,17 @@ cd ${PRGNAM}-${VERSION} # Install font: cp uming.ttf $PKG$FONTDIR/ -# Add the fontconfig file: +# Add the fontconfig files: +# The default fontconfig file assigns 'AR PL ShanHeiSun Uni' as the preferred +# sans and serif font. This is undesirable for the average user. +# So we provide a patched fontconfig file that does not mess with these preferences, +# and also provide the original as '20-ttf-arphic-uming-preferred.conf'. +# Add a symlink to exactly one of the two files in /etc/fonts/fonts.d/ mkdir -p $PKG/etc/fonts/conf.{d,avail} -cp ttf-arphic-uming $PKG/etc/fonts/conf.avail/20-ttf-arphic-uming.conf +cp ttf-arphic-uming $PKG/etc/fonts/conf.avail/20-ttf-arphic-uming-preferred.conf +patch -o $PKG/etc/fonts/conf.avail/20-ttf-arphic-uming.conf \ + ttf-arphic-uming $SRCDIR/ttf-arphic-uming_accept.patch +chmod 644 $PKG/etc/fonts/conf.avail/20-ttf-arphic-uming.conf ( cd $PKG/etc/fonts/conf.d && \ ln -sf ../conf.avail/20-ttf-arphic-uming.conf ) -- cgit v1.2.3