tags 496059 + patch thanks Dear ghostscript maintainers,
I have created the attached patch against the gsfonts package, which adds support for a ttf-gsfonts package providing TrueType transformations of the fonts. What is still missing from the patch is a changelog entry and an appropriate ttf-gsfonts.hints file. The ttf-gsfonts.{docs,prerm,postinst} files have been copied over from the gsfonts ones with minor modifications where needed.
Please consider accepting this patch or at least review and comment it! Thank you very much! Cheers, Fabian -- Dipl.-Phys. Fabian Greffrath Ruhr-Universität Bochum Lehrstuhl für Energieanlagen und Energieprozesstechnik (LEAT) Universitätsstr. 150, IB 3/134 D-44780 Bochum Telefon: +49 (0)234 / 32-26334 Fax: +49 (0)234 / 32-14227 E-Mail: [EMAIL PROTECTED]
diff -Naru gsfonts-8.11+urwcyr1.0.7~pre44/debian/control gsfonts-8.11+urwcyr1.0.7~pre44~/debian/control --- gsfonts-8.11+urwcyr1.0.7~pre44/debian/control 2008-09-17 09:31:17.000000000 +0200 +++ gsfonts-8.11+urwcyr1.0.7~pre44~/debian/control 2008-09-17 10:01:30.000000000 +0200 @@ -3,6 +3,7 @@ Priority: optional Maintainer: Masayuki Hatta (mhatta) <[EMAIL PROTECTED]> Build-Depends: debhelper (>= 4.0.0), sharutils +Build-Depends-Indep: defoma (>= 0.7.0), fontforge Standards-Version: 3.8.0 Uploaders: Torsten Landschoff <[EMAIL PROTECTED]> @@ -13,3 +14,12 @@ Description: Fonts for the Ghostscript interpreter(s) These are free look-alike fonts of the Adobe PostScript fonts. Recommended for all flavors of Ghostscript (gs-gpl, gs-afpl and gs-esp). + +Package: ttf-gsfonts +Architecture: all +Depends: defoma (>= 0.11.10) +Recommends: x-ttcidfont-conf | fontconfig +Description: TrueType transformations of the Ghostscript fonts + These are free look-alike fonts of the Adobe PostScript fonts. + . + This package contains the TrueType transformations. diff -Naru gsfonts-8.11+urwcyr1.0.7~pre44/debian/convert.pe gsfonts-8.11+urwcyr1.0.7~pre44~/debian/convert.pe --- gsfonts-8.11+urwcyr1.0.7~pre44/debian/convert.pe 1970-01-01 01:00:00.000000000 +0100 +++ gsfonts-8.11+urwcyr1.0.7~pre44~/debian/convert.pe 2008-09-17 09:39:37.000000000 +0200 @@ -0,0 +1,58 @@ +#!/usr/bin/fontforge +# +# This script is taken from: +# <http://fontforge.sourceforge.net/scripting-tutorial.html> +# +# Copyright (C) 2000-2006 George Williams +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# Redistributions in binary form must reproduce the above copyright notice, this +# list of conditions and the following disclaimer in the documentation and/or +# other materials provided with the distribution. +# +# The name of the author may not be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +i=1 +format=".ttf" +while ( i<$argc ) + if ( $argv[i]=="-format" || $argv[i]=="--format" ) + i=i+1 + if ( i<$argc ) + format = $argv[i] + if ( format!=".ttf" && format!=".otf" && \ + format!=".pfb" && format!=".svg" ) + Error( "Expected one of '.ttf', '.otf', '.pfb' or '.svg' for format" ) + endif + endif + else + Open($argv[i]) + if ( $order==2 && (format==".otf" || format==".pfb" )) + SetFontOrder(3) + SelectAll() + Simplify(128+32+8,1.5) + ScaleToEm(1000) + elseif ( $order==3 && format==".ttf" ) + ScaleToEm(2048) + RoundToInt() + endif + Generate($argv[i]:r + format) + endif + i = i+1 +endloop diff -Naru gsfonts-8.11+urwcyr1.0.7~pre44/debian/rules gsfonts-8.11+urwcyr1.0.7~pre44~/debian/rules --- gsfonts-8.11+urwcyr1.0.7~pre44/debian/rules 2008-09-17 09:31:17.000000000 +0200 +++ gsfonts-8.11+urwcyr1.0.7~pre44~/debian/rules 2008-09-17 09:47:55.000000000 +0200 @@ -37,12 +37,15 @@ #$(MAKE) #/usr/bin/docbook-to-man debian/gsfonts.sgml > gsfonts.1 + chmod 0755 debian/convert.pe && \ + debian/convert.pe --format ".ttf" *.pfb + touch build-stamp clean: dh_testdir dh_testroot - rm -f debian/*.pfb + rm -f debian/*.pfb *.ttf rm -f build-stamp configure-stamp # Add here commands to clean up after the build process. @@ -61,10 +64,12 @@ install -m 644 $(CURDIR)/*.afm $(CURDIR)/debian/gsfonts/usr/share/fonts/type1/gsfonts install -m 644 $(CURDIR)/*.pfb $(CURDIR)/debian/gsfonts/usr/share/fonts/type1/gsfonts install -m 644 $(CURDIR)/*.pfm $(CURDIR)/debian/gsfonts/usr/share/fonts/type1/gsfonts + install -m 644 $(CURDIR)/*.ttf $(CURDIR)/debian/ttf-gsfonts/usr/share/fonts/truetype/ttf-gsfonts # cd debian && uudecode *.uue # install -m 644 debian/*.afm $(CURDIR)/debian/gsfonts/usr/share/fonts/type1/gsfonts # install -m 644 debian/*.pfb $(CURDIR)/debian/gsfonts/usr/share/fonts/type1/gsfonts install -m 644 $(CURDIR)/debian/gsfonts.hints $(CURDIR)/debian/gsfonts/etc/defoma/hints +# install -m 644 $(CURDIR)/debian/ttf-gsfonts.hints $(CURDIR)/debian/ttf-gsfonts/etc/defoma/hints # Build architecture-independent files here. binary-indep: build install diff -Naru gsfonts-8.11+urwcyr1.0.7~pre44/debian/ttf-gsfonts.dirs gsfonts-8.11+urwcyr1.0.7~pre44~/debian/ttf-gsfonts.dirs --- gsfonts-8.11+urwcyr1.0.7~pre44/debian/ttf-gsfonts.dirs 1970-01-01 01:00:00.000000000 +0100 +++ gsfonts-8.11+urwcyr1.0.7~pre44~/debian/ttf-gsfonts.dirs 2008-09-17 09:54:54.000000000 +0200 @@ -0,0 +1 @@ +usr/share/fonts/truetype/ttf-gsfonts diff -Naru gsfonts-8.11+urwcyr1.0.7~pre44/debian/ttf-gsfonts.docs gsfonts-8.11+urwcyr1.0.7~pre44~/debian/ttf-gsfonts.docs --- gsfonts-8.11+urwcyr1.0.7~pre44/debian/ttf-gsfonts.docs 1970-01-01 01:00:00.000000000 +0100 +++ gsfonts-8.11+urwcyr1.0.7~pre44~/debian/ttf-gsfonts.docs 2008-09-17 10:06:36.000000000 +0200 @@ -0,0 +1,3 @@ +README +README.tweaks +TODO diff -Naru gsfonts-8.11+urwcyr1.0.7~pre44/debian/ttf-gsfonts.postinst gsfonts-8.11+urwcyr1.0.7~pre44~/debian/ttf-gsfonts.postinst --- gsfonts-8.11+urwcyr1.0.7~pre44/debian/ttf-gsfonts.postinst 1970-01-01 01:00:00.000000000 +0100 +++ gsfonts-8.11+urwcyr1.0.7~pre44~/debian/ttf-gsfonts.postinst 2008-09-17 10:05:08.000000000 +0200 @@ -0,0 +1,46 @@ +#! /bin/sh +# postinst script for gsfonts +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * <postinst> `configure' <most-recently-configured-version> +# * <old-postinst> `abort-upgrade' <new version> +# * <conflictor's-postinst> `abort-remove' `in-favour' <package> +# <new-version> +# * <deconfigured's-postinst> `abort-deconfigure' `in-favour' +# <failed-install-package> <version> `removing' +# <conflicting-package> <version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +# + +case "$1" in + configure) + echo "(Re-)registering PostScript fonts..." + if [ -f /etc/defoma/hints/ttf-gsfonts.hints ]; then + defoma-font -q reregister-all /etc/defoma/hints/ttf-gsfonts.hints + fi + echo done. + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff -Naru gsfonts-8.11+urwcyr1.0.7~pre44/debian/ttf-gsfonts.prerm gsfonts-8.11+urwcyr1.0.7~pre44~/debian/ttf-gsfonts.prerm --- gsfonts-8.11+urwcyr1.0.7~pre44/debian/ttf-gsfonts.prerm 1970-01-01 01:00:00.000000000 +0100 +++ gsfonts-8.11+urwcyr1.0.7~pre44~/debian/ttf-gsfonts.prerm 2008-09-17 10:05:20.000000000 +0200 @@ -0,0 +1,44 @@ +#! /bin/sh +# prerm script for gsfonts +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * <prerm> `remove' +# * <old-prerm> `upgrade' <new-version> +# * <new-prerm> `failed-upgrade' <old-version> +# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version> +# * <deconfigured's-prerm> `deconfigure' `in-favour' +# <package-being-installed> <version> `removing' +# <conflicting-package> <version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|deconfigure) +# install-info --quiet --remove /usr/info/gsfonts.info.gz + echo "Unregistering PostScript fonts..." + if [ -f /etc/defoma/hints/ttf-gsfonts.hints ]; then + defoma-font -q purge-all /etc/defoma/hints/ttf-gsfonts.hints + fi + echo done. + ;; + failed-upgrade) + ;; + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + +