[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Pkg-fonts-devel] Bug#460945: marked as done (ttf-sil-abyssinica: PLease strip the Latin range from the font in the udeb)



Your message dated Sat, 23 Feb 2008 15:47:03 +0000
with message-id <E1JSwad-00063Q-Dq@ries.debian.org>
and subject line Bug#460945: fixed in ttf-sil-abyssinica 1.0-4
has caused the Debian Bug report #460945,
regarding ttf-sil-abyssinica: PLease strip the Latin range from the font in the udeb
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
460945: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=460945
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: ttf-sil-abyssinica
Version: 1.0-3
Severity: normal
Tags: patch

The D-I team wishes to keep extra fonts as small as possible. Therefore, we
decided to strip out the range of Latin characters from the fonts we need to
have in order to support more languages.

The attached patch will strip the Latin characters range out of the font, in
the udeb package only. It saves several dozens of kb for D-I.

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

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

Versions of packages ttf-sil-abyssinica depends on:
ii  defoma                       0.11.10-0.1 Debian Font Manager -- automatic f

ttf-sil-abyssinica recommends no packages.

-- no debconf information
diff -Nru ttf-sil-abyssinica-1.0/debian/rules ttf-sil-abyssinica-1.0.new/debian/rules
--- ttf-sil-abyssinica-1.0/debian/rules	2008-01-08 18:46:45.299346188 +0100
+++ ttf-sil-abyssinica-1.0.new/debian/rules	2008-01-09 18:16:52.036547417 +0100
@@ -3,11 +3,17 @@
 build: build-stamp
 build-stamp:
 	touch build-stamp
+	chmod u+x debian/scripts/strip
+	chmod u+x debian/scripts/strip_glyphs.pe
+	# Strip the fonts for the udeb
+	mkdir TTF-stripped
+	debian/scripts/strip Abyssinica_SIL.ttf TTF-stripped/Abyssinica_SIL.ttf
 
 clean:
 	dh_testdir
 	dh_testroot
 	rm -f build-stamp
+	rm -rf TTF-stripped
 	dh_clean
 
 install: build
diff -Nru ttf-sil-abyssinica-1.0/debian/rules~ ttf-sil-abyssinica-1.0.new/debian/rules~
--- ttf-sil-abyssinica-1.0/debian/rules~	1970-01-01 01:00:00.000000000 +0100
+++ ttf-sil-abyssinica-1.0.new/debian/rules~	2008-01-08 18:53:18.790315687 +0100
@@ -0,0 +1,44 @@
+#!/usr/bin/make -f
+
+build: build-stamp
+build-stamp:
+	touch build-stamp
+	chmod u+x debian/scripts/strip
+	chmod u+x debian/scripts/strip_glyphs.pe
+	# Strip the fonts for the udeb
+	mkdir TTF-stripped
+	debian/scripts/strip Abyssinica_SIL.ttf TTF-stripped/Abyssinica_SIL.ttf
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+	-rm -rf TTF-stripped
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_install
+	chmod 755 debian/bug/script
+
+
+binary-arch:
+
+binary-indep: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs FONTLOG.txt
+	dh_installdocs
+	dh_compress
+	dh_installdefoma
+	dh_fixperms
+	dh_installdeb
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+
+.PHONY: build clean install binary-arch binary-indep binary
diff -Nru ttf-sil-abyssinica-1.0/debian/scripts/README.strip_glyphs ttf-sil-abyssinica-1.0.new/debian/scripts/README.strip_glyphs
--- ttf-sil-abyssinica-1.0/debian/scripts/README.strip_glyphs	1970-01-01 01:00:00.000000000 +0100
+++ ttf-sil-abyssinica-1.0.new/debian/scripts/README.strip_glyphs	2008-01-07 18:47:41.145527589 +0100
@@ -0,0 +1,18 @@
+strip_glyphs.pe is a fontforge script (syntax is documented at
+http://fontforge.sourceforge.net/scripting.html)
+
+Usage: "strip_glyphs.pe in out glyphs"
+
+It strips glyphs out of a font file; glyphs can be ranges
+or single code points.
+Code points can be expressed as integers or in unicode notation (i.e
+"u215") and ranges are separated by ":".
+
+As a practical example, this commands were used to eliminate
+Arabic glyphs from the freefont package:
+
+./strip_glyphs.pe FreeSerif.ttf FreeSerif_strip.ttf u60c:u6d4 ufb50:ufefe
+./strip_glyphs.pe FreeSansBold.ttf FreeSansBold_strip.ttf u617:u633
+
+Note that "in" and "out" can be the same file; in that case, obviously,
+"in" gets overwritten.
diff -Nru ttf-sil-abyssinica-1.0/debian/scripts/strip ttf-sil-abyssinica-1.0.new/debian/scripts/strip
--- ttf-sil-abyssinica-1.0/debian/scripts/strip	1970-01-01 01:00:00.000000000 +0100
+++ ttf-sil-abyssinica-1.0.new/debian/scripts/strip	2008-01-08 07:21:35.559513778 +0100
@@ -0,0 +1,54 @@
+#! /bin/bash
+
+exepath=$(dirname $0)
+strip=$exepath/strip_glyphs.pe
+
+if [ $# -ne 2 ] ; then
+	echo "Usage: $(basename $0) fontfile_in fontfile_out"
+	exit 0
+fi
+
+if [ ! -x "$strip" ] ; then
+	echo "Script not found: $strip"
+	exit 1
+fi
+
+if [ ! -f "$1" ] ; then
+	echo "File does not exist: $1"
+	exit 1
+fi
+if [ -z "$2" ] ; then
+	echo "You need to specify the output file"
+	exit 1
+fi
+
+ranges=""
+ranges="$ranges u0021:u02AF" # latin
+ranges="$ranges u0370:u03FF" # Greek and Coptic
+ranges="$ranges u0400:u052F" # Cyrilic
+ranges="$ranges u0530:u058F" # Armenian
+ranges="$ranges u0590:u05FF" # Hebrew
+ranges="$ranges uFB1D:uFB4F" # Hebrew 2
+ranges="$ranges u0600:u06FF" # Arabic
+ranges="$ranges u0700:u077F" # Syriac
+ranges="$ranges u0b00:u0b7f" # Oriya
+ranges="$ranges u0b80:u0bff" # Tamil
+#ranges="$ranges u0900:u097F" # Hindi
+#ranges="$ranges u0980:u099F" # Bengali
+#ranges="$ranges u0A00:u0CFF" # Gurmukhi, Gujarati, Oriya, Tamil, Telugu, Kannada
+ranges="$ranges u0D00:u0FFF" # Malayalam, Sinhala, Thai, Lao, Tibetan
+ranges="$ranges u10A0:u10FF" # Georgian
+ranges="$ranges u1EA0:u1EFF" # Vietnamese
+ranges="$ranges u1F00:u1FFF" # Greek Extended
+ranges="$ranges u2070:u209F" # Superscripts and Subscripts
+ranges="$ranges u2100:u21FF" # Letterlike, Number forms, Arrows
+ranges="$ranges u2200:u24FF" # Mathematical, Techical, Control, OCR
+ranges="$ranges u2580:u259F" # Block elements
+ranges="$ranges u2600:u26FF" # Miscellaneous Symbols
+ranges="$ranges u2700:u27BF" # Dingbats
+ranges="$ranges u3000:u30FF" # CJK Symbols and Punctuation
+#if ! echo $1 | grep -q Bold; then
+#      ranges="$ranges 65536:66002"   # Bengali conjuncts
+#fi
+
+$strip $1 $2 $ranges
diff -Nru ttf-sil-abyssinica-1.0/debian/scripts/strip_glyphs.pe ttf-sil-abyssinica-1.0.new/debian/scripts/strip_glyphs.pe
--- ttf-sil-abyssinica-1.0/debian/scripts/strip_glyphs.pe	1970-01-01 01:00:00.000000000 +0100
+++ ttf-sil-abyssinica-1.0.new/debian/scripts/strip_glyphs.pe	2008-01-07 18:47:41.145527589 +0100
@@ -0,0 +1,81 @@
+#! /usr/bin/fontforge 
+#
+#     Copyright (C) 2005 Davide Viti <zinosat@tiscali.it>
+#
+#     This program is free software; you can redistribute it and/or modify
+#     it under the terms of the GNU General Public License as published by
+#     the Free Software Foundation; either version 2 of the License, or
+#     (at your option) any later version.
+#
+#     This program is distributed in the hope that it will be useful,
+#     but WITHOUT ANY WARRANTY; without even the implied warranty of
+#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#     GNU General Public License for more details.
+#
+#     You should have received a copy of the GNU General Public
+#     License along with this program; if not, write to the Free
+#     Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+#     MA 02111-1307 USA
+#
+# "glyphs_to_remove" argument can be a single code point
+# or a range of codepoints separated by ":"
+#
+# code points can be specified both as integers and as unicode
+# you can also mix the two formats (i.e "48:u54")
+#
+# example: 
+#
+#      "strip_glyphs in.ttf out.ttf 12 u20 100:150 u200:u230 u300:65000"
+
+if ($argc < 4)
+   Print( "Usage: strip_glyphs in out glyphs_to_remove..." )
+   Quit()
+endif
+
+
+Open($1); shift
+Reencode("unicode")
+out = $1; shift
+
+#
+# Loop through the arguments and select the glyphs
+# which need to be cleared
+#
+while ($argc > 1)
+  len = Strlen($1)
+  colon_idx = Strstr($1, ":")
+
+  #  
+  # argument is a single glyph
+  #
+  if (colon_idx == -1)
+    if(Strstr($1, "u") == -1)
+       SelectMore(Strtol($1)) ## Integer
+    else
+       SelectMore($1) ## Unicode code point (i.e "u0027")
+    endif
+
+  #  
+  # argument is a range low:high
+  #
+  else      
+     low = Strsub($1, 0, colon_idx)
+     if(Strstr($1, "u") == -1)
+        low = Strtol(low) ## Integer
+     endif
+
+     high = Strsub($1, colon_idx+1, len)
+     if(Strstr($1, "u") == -1)
+        high = Strtol(high) ## Integer
+     endif
+   
+     SelectMore(low, high);
+  endif
+
+  shift
+endloop
+
+Clear()
+
+Generate(out, "")
+Quit()
diff -Nru ttf-sil-abyssinica-1.0/debian/ttf-sil-abyssinica-udeb.install ttf-sil-abyssinica-1.0.new/debian/ttf-sil-abyssinica-udeb.install
--- ttf-sil-abyssinica-1.0/debian/ttf-sil-abyssinica-udeb.install	2008-01-08 18:46:45.299346188 +0100
+++ ttf-sil-abyssinica-1.0.new/debian/ttf-sil-abyssinica-udeb.install	2008-01-08 07:19:38.065666900 +0100
@@ -1 +1 @@
-Abyssinica_SIL.ttf usr/share/fonts/truetype/ttf-sil-abyssinica
+TTF-stripped/Abyssinica_SIL.ttf usr/share/fonts/truetype/ttf-sil-abyssinica

--- End Message ---
--- Begin Message ---
Source: ttf-sil-abyssinica
Source-Version: 1.0-4

We believe that the bug you reported is fixed in the latest version of
ttf-sil-abyssinica, which is due to be installed in the Debian FTP archive:

ttf-sil-abyssinica-udeb_1.0-4_all.udeb
  to pool/main/t/ttf-sil-abyssinica/ttf-sil-abyssinica-udeb_1.0-4_all.udeb
ttf-sil-abyssinica_1.0-4.diff.gz
  to pool/main/t/ttf-sil-abyssinica/ttf-sil-abyssinica_1.0-4.diff.gz
ttf-sil-abyssinica_1.0-4.dsc
  to pool/main/t/ttf-sil-abyssinica/ttf-sil-abyssinica_1.0-4.dsc
ttf-sil-abyssinica_1.0-4_all.deb
  to pool/main/t/ttf-sil-abyssinica/ttf-sil-abyssinica_1.0-4_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 460945@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Nicolas Spalinger <nicolas.spalinger@sil.org> (supplier of updated ttf-sil-abyssinica package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sun, 27 Jan 2008 20:19:40 +0100
Source: ttf-sil-abyssinica
Binary: ttf-sil-abyssinica ttf-sil-abyssinica-udeb
Architecture: source all
Version: 1.0-4
Distribution: unstable
Urgency: low
Maintainer: Debian Fonts Task Force <pkg-fonts-devel@lists.alioth.debian.org>
Changed-By: Nicolas Spalinger <nicolas.spalinger@sil.org>
Description: 
 ttf-sil-abyssinica - smart Unicode font for the Ethiopic script (Amharic)
 ttf-sil-abyssinica-udeb - Debian-Installer font for the Ethiopic script (Amharic) (udeb)
Closes: 460945
Changes: 
 ttf-sil-abyssinica (1.0-4) unstable; urgency=low
 .
   * Added fontforge script to strip the uneeded glyphs to reduce the d-i
     footprint. The udeb font is also renamed and this is reflected in
     the metadata (Closes: #460945). Thanks to Christian Perrier for his
     patch and to Davide Viti for his fontforge script.
Files: 
 12a8021e25415ccbc9467ecc18c8021f 993 x11 optional ttf-sil-abyssinica_1.0-4.dsc
 50c62492749b3ef091ab6a610a3b18e4 7118 x11 optional ttf-sil-abyssinica_1.0-4.diff.gz
 9ff04a7dcc9d151a1df79cabb1d9cf82 735014 x11 optional ttf-sil-abyssinica_1.0-4_all.deb
 068457d61998d78721e9a0bb48a82dd9 193392 debian-installer optional ttf-sil-abyssinica-udeb_1.0-4_all.udeb
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHwD595Sc9mGvjxCMRAk6cAJ9vZ+2RhoHH65LcSiOZdqyqGP08FwCfSRAY
ztn2Mn+m4u/X7aHj9MCX9sE=
=s9tJ
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: