Bug#496059: please provide truetype flavors of the ghostscript fonts

2008-09-17 Thread Fabian Greffrath

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.0 +0200
+++ gsfonts-8.11+urwcyr1.0.7~pre44~/debian/control	2008-09-17 10:01:30.0 +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.0 +0100
+++ gsfonts-8.11+urwcyr1.0.7~pre44~/debian/convert.pe	2008-09-17 09:39:37.0 +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.0 +0200
+++ gsfonts-8.11+urwcyr1.0.7~pre44~/debian/rules	2008-09-17 09:47:55.0 +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 

Bug#496059: please provide truetype flavors of the ghostscript fonts

2008-08-22 Thread Fabian Greffrath

Package: gsfonts
Version: 1:8.11+urwcyr1.0.7~pre44-3
Severity: wishlist

Dear ghostscript maintainers,

I don't know if this request belongs to ghostscript, gsfonts or 
gsfonts-x11 but I believe this is the right package since it contains 
the original fonts.


I'd like to ask you to provide truetype flavours of all fonts 
contained in the gsfonts package. The conversion is possible with a 
simple script, since fontforge is able to read .pfb files and save 
them in .ttf format.


I don't now, however, if or how this will collide with the fonts 
provided by the gsfonts-x11 package. Moreover I don't know if the 
fonts in the original ghostscript upstream tarball are to be preferred 
over the fonts provided by gsfonts?


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]



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]