Bug#247198: /var/lib/defoma/scripts/pango.defoma: missing
escaping of regex
Flavio Stanchina
Flavio Stanchina <flavio.stanchina@tin.it>, 247198@bugs.debian.org
Mon, 03 May 2004 21:47:38 +0200
This is a multi-part MIME message sent by reportbug.
--===============1040078718==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Package: libpango1.0-common
Version: 1.2.5-4
Severity: normal
Tags: patch
I'm packaging a few fonts from http://fonts.tom7.com/ and the hints
file generated by defoma-hints contains
Foundry = [ Divide By Zero ] Fonts
When I install the fonts, I get this error:
W: In pango::xfont('term'): Invalid [] range "t-i" in regex;
marked by <-- HERE in m/[-prog.bot-i <-- HERE so8859-1/ at
/var/lib/defoma/scripts/pango.defoma line 91.
The attached patch apparently solves this problem, but all the Perl I
know I have learned in fixing this bug so double-check for correctness.
-- System Information:
Debian Release: testing/unstable
Architecture: i386 (i686)
Kernel: Linux 2.6.5-athlon
Locale: LANG=C, LC_CTYPE=C
Versions of packages libpango1.0-common depends on:
ii debconf 1.4.22 Debian configuration management sy
ii defoma 0.11.7 Debian Font Manager -- automatic f
ii fontconfig 2.2.2-2 generic font configuration library
ii libc6 2.3.2.ds1-11 GNU C Library: Shared libraries an
ii libfontconfig1 2.2.2-2 generic font configuration library
ii libfreetype6 2.1.7-2 FreeType 2 font engine, shared lib
ii libglib2.0-0 2.2.3-1 The GLib library of C routines
ii libpango1.0-0 1.2.5-4 Layout and rendering of internatio
ii libx11-6 4.3.0-7 X Window System protocol client li
ii libxft2 2.1.2-6 FreeType-based font drawing librar
ii libxrender1 0.8.3-7 X Rendering Extension client libra
ii xlibs 4.3.0-7 X Window System client libraries m
ii zlib1g 1:1.2.1-5 compression library - runtime
-- debconf information:
libpango1.0-common/saved_aliases_file:
* libpango1.0-common/suggested_fonts:
* libpango1.0-common/notice_xft2_and_fontconfig:
* libpango1.0-common/use_defoma: true
libpango1.0-common/other_fonts:
libpango1.0-common/generated_aliases_file:
--===============1040078718==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="libpango-defoma-escape.patch"
--- pango.defoma-orig 2003-07-27 23:50:15.000000000 +0200
+++ pango.defoma 2004-05-03 21:08:40.000000000 +0200
@@ -72,6 +72,7 @@
foreach my $i (@cache) {
my $font = $Id->{1}->[$i];
+ my $tmp;
$font =~ s/_/ /g;
$xe = get_xlfd_element ($font);
$xlfd = generate_xlfd ($xe);
@@ -88,7 +89,8 @@
push (@nnbn_xlfd, $xlfd) if (!grep (/$xe->{Foundry}-$xe->{Family}-$xe->{Encoding}/, @nnbn_xlfd));
next;
}
- push (@nnnn_xlfd, $xlfd) if (!grep (/$xe->{Foundry}-$xe->{Family}-$xe->{Encoding}/, @nnnn_xlfd));
+ $tmp = "$xe->{Foundry}-$xe->{Family}-$xe->{Encoding}";
+ push (@nnnn_xlfd, $xlfd) if (!grep (/\Q$tmp/, @nnnn_xlfd));
}
return \(@nnnn_xlfd, @innn_xlfd, @nnbn_xlfd, @inbn_xlfd);
}
--===============1040078718==--