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

Bug#231616: defoma: Apply patch, please



Package: defoma
Followup-For: Bug #231616
Found: #231616 0.11.10-2
Found: #231616 0.11.10-0.2
Tags: +patch +lenny -unreproducible


Hello,

the problem described above bites me, using lenny, too.

For every truetype fontfile I try to generate a
hintfile with:

# defoma-hints -c truetype /usr/local/share/fonts/truetype/Some-Font-Filename.ttf

I only get tons of:

Use of uninitialized value $h[0] in pattern match (m//) at /usr/share/defoma/libperl-hint.pl line 43.
Use of uninitialized value $h[0] in pattern match (m//) at /usr/share/defoma/libperl-hint.pl line 43.
Use of uninitialized value $h[0] in pattern match (m//) at /usr/share/defoma/libperl-hint.pl line 43.
Use of uninitialized value $h[0] in pattern match (m//) at /usr/share/defoma/libperl-hint.pl line 43.
Use of uninitialized value $h[0] in pattern match (m//) at /usr/share/defoma/libperl-hint.pl line 43.
Use of uninitialized value $h[0] in pattern match (m//) at /usr/share/defoma/libperl-hint.pl line 43.
....


To fix this in Lenny I had to do the following steps:

1) dpkg --install libfont-freetype-perl_0.03-1_i386.deb

2) dpkg --install defoma_0.11.10-2_all.deb

3) fix /usr/share/defoma/libperl-hint.pl with the patch from Ambrose Li
   posted on Tue, 31 Aug 2004 !!!!!!!
--- /usr/share/defoma/libperl-hint.pl.orig	2004-08-21 13:29:31.000000000 -0400
+++ /usr/share/defoma/libperl-hint.pl	2004-08-31 13:13:55.000000000 -0400
@@ -39,7 +39,7 @@
 	foreach my $f (defoma_font_get_fonts($c)) {
 	    my @h = defoma_font_get_hints($c, $f);
 	    next unless (@h);
-	    while ($h[0] !~ /^--/) {
+	    while (@h && $h[0] !~ /^--/) {
 		shift(@h);
 	    }
 	    push(@hints, @h);


After that I could generate a valid hintfile for many fonts with:
# defoma-hints --no-question truetype *.ttf > localtruetype.hints

and register this fonts with:
# defoma-font register-all localtruetype.hints

As this patch fixed the problem, and no better solution has appeared for 5 years,
apply it, please.


Thanks,
Martin



Reply to: