--- xfonts-kaname-1.1.orig/debian/changelog
+++ xfonts-kaname-1.1/debian/changelog
@@ -0,0 +1,80 @@
+xfonts-kaname (1.1-9) unstable; urgency=low
+
+  * Update Standards-Version.
+  * debian/control: debhelper is added into Build-Depends instead of
+    Build-Depends-Indep.
+
+ -- GOTO Masanori <gotom@debian.org>  Sun,  7 May 2006 10:02:56 +0900
+
+xfonts-kaname (1.1-8.1) unstable; urgency=low
+
+  * NMU (acknowledged by gotom on IRC)
+  * adapt new X fonts directory structure, closes: #362381
+     - fonts are moved to /usr/share/fonts/X11/misc
+     - xfonts-ayu.alias is installed into /etc/X11/fonts/X11R7/misc
+     - update version of Build-Depends-Indep: debhelper to handle
+       these directory structure
+     - update dependencies
+
+ -- ISHIKAWA Mutsumi <ishikawa@debian.org>  Wed, 26 Apr 2006 01:36:07 +0900
+
+xfonts-kaname (1.1-8) unstable; urgency=low
+
+  * Add gawk to Build-Depends-Indep.  (Closes: #242969)
+
+ -- GOTO Masanori <gotom@debian.org>  Sat, 10 Apr 2004 13:05:30 +0900
+
+xfonts-kaname (1.1-7) unstable; urgency=low
+
+  * debian/control: updated Standards-Version 3.6.0.
+  * debian/control: updated Description to reflect its explanation
+    appropriately.
+  * debian/mkbold, debian/mkitalic: added to support bold and italic fonts.
+  * debian/rules: added to generate bold/italic/bold-italic kaname-latin1,
+    italic/bold-italic knm12p, knm12pb, knmzn12x, hnmzn12xb.
+
+ -- GOTO Masanori <gotom@debian.org>  Mon,  5 Apr 2004 22:03:42 +0900
+
+xfonts-kaname (1.1-6) unstable; urgency=low
+
+  * debian/control: add more description.  Patched by Marek Habersack
+    <grendel@debian.org>.  (Closes: #210052)
+
+ -- GOTO Masanori <gotom@debian.or.jp>  Sun, 14 Sep 2003 04:09:48 +0900
+
+xfonts-kaname (1.1-5) unstable; urgency=low
+
+  * debian/control: change build-depends to build-depends-indep. 
+  * debian/control: add depends xutils (>> 4.0.3)
+  * debian/control: add conflicts xbase-clients (<< 4.0).
+
+ -- GOTO Masanori <gotom@debian.or.jp>  Sun, 18 Nov 2001 23:01:57 +0900
+
+xfonts-kaname (1.1-4) unstable; urgency=low
+
+  * debian/control: Architecture any -> all.
+
+ -- GOTO Masanori <gotom@debian.or.jp>  Mon, 19 Mar 2001 02:51:21 +0900
+
+xfonts-kaname (1.1-3) unstable; urgency=low
+
+  * Maintainer Changed.
+  * Update Standards-Version: 3.2.1
+  * Changed fonts installation destination: 
+    from /usr/X11R6/lib/X11/fonts/kaname/ to misc/.
+
+ -- GOTO Masanori <gotom@debian.or.jp>  Mon, 19 Mar 2001 02:07:53 +0900
+
+xfonts-kaname (1.1-2) unstable; urgency=low
+
+  * Fixed misscoding in postrm
+
+ -- Takuo KITAME <kitame@northeye.org>  Wed, 10 Nov 1999 17:55:01 +0900
+
+xfonts-kaname (1.1-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Takuo KITAME <kitame@northeye.org>  Mon, 11 Oct 1999 00:59:53 +0900
+
+
--- xfonts-kaname-1.1.orig/debian/docs
+++ xfonts-kaname-1.1/debian/docs
@@ -0,0 +1 @@
+readme
--- xfonts-kaname-1.1.orig/debian/control
+++ xfonts-kaname-1.1/debian/control
@@ -0,0 +1,18 @@
+Source: xfonts-kaname
+Section: x11
+Priority: optional
+Maintainer: GOTO Masanori <gotom@debian.org>
+Build-Depends: debhelper (>= 5.0.33)
+Build-Depends-Indep: xfonts-utils, gawk
+Standards-Version: 3.7.2
+
+Package: xfonts-kaname
+Architecture: all
+Depends: ${misc:Depends}
+Suggests: xfs | xserver
+Conflicts: xbase-clients (<< 4.0)
+Description: Kaname Cho 12 dot Japanese Kanji, Latin 1 fonts for X11
+ This package includes Kaname Cho 12dot Japanese Kanji, ISO-8859-1 fonts
+ for the X Window System.  Its face has characteristic, and it is similar
+ to Gothic.  It provides 4 weigh: Medium, Bold, Italic and Bold-Italic.
+ It also provides 2 spc: -p- and -c- for Japanese fonts.
--- xfonts-kaname-1.1.orig/debian/dirs
+++ xfonts-kaname-1.1/debian/dirs
@@ -0,0 +1,2 @@
+usr/share/fonts/X11/misc
+usr/share/doc/xfonts-kaname
--- xfonts-kaname-1.1.orig/debian/mkbold
+++ xfonts-kaname-1.1/debian/mkbold
@@ -0,0 +1,150 @@
+#!/usr/bin/perl
+#
+#  -- makes BDF font bold
+#	programmed by NAGAO, Sadakazu <snagao@cs.titech.ac.jp>	
+#	modified by Yasuyuki Furukawa <yasu@on.cs.keio.ac.jp>	
+#		* public domain *
+#
+
+$bdir = 1;			# left
+$pile = 0;			# right
+
+$verbose = 0;
+$verbose_min = 100;
+
+for $opt (@ARGV) {
+    if ($opt =~ /^-/) {	# option
+	$bdir = 0 if $opt eq '-r';	# right
+	$bdir = 1 if $opt eq '-l';	# left
+	$pile = 0 if $opt eq '-R';	# right
+	$pile = 1 if $opt eq '-L';	# left
+	$verbose = 1 if $opt eq '-V';	# verbose
+	next;
+    } else {
+	$file = $opt;
+	last;
+    }
+}
+$file= "-" unless $file;
+
+open F, $file || die;
+
+$col = int(`stty  -F /dev/tty size 2>/dev/null | sed 's/.* //'`) || 80;
+
+$ch_count = 0;
+
+@vmeter = ("|", "\\", "-", "/");
+
+while (<F>) {
+
+    if (/^FONT[ \t]/ || /^WEIGHT_NAME/) {
+	s/Medium/Bold/;
+	print;
+	next;
+    }
+
+    if (/^CHARS[ \t]/) {
+	$max_chars = substr($_, 6);
+    }
+
+    if (/^BITMAP/) {
+	$bitmap = 1;
+	print;
+	next;
+    }
+
+    if (/^ENDCHAR/) {
+	$bitmap = 0;
+	print;
+
+	if (($ch_count++ % 20) == 0 && $verbose != 0 && $max_chars > $verbose_min) {
+	    $n = int($ch_count * 100 / $max_chars);
+	    $m = int($n * ($col - 21) / 100);
+	    $l = $col - 20 - $m;
+	    printf STDERR "\rprogress|" . rstr("=", $m) . rstr(" ", $l) . "$n%%" . $vmeter[$ch_count2++ % 4] 
+	}
+	next;
+    }
+
+    if ($bitmap) {
+	chop;
+	$l = (length($_) / 2) - 1;
+
+	if ($bdir) {		# left
+	    for $i (0..$l) {
+		$d[$i] = hex(substr($_, $i*2, 2));
+	    }
+	    shl(\@bold, \@d, $l);
+	} else {
+	    for $i (0..$l) {	# right
+		$bold[$i] = hex(substr($_, $i*2, 2));
+	    }
+	    shr(\@d, \@bold, $l);
+
+	}
+
+	if ($pile) {		# left
+	    shl(\@tmp, \@bold, $l);
+	    bitcalc(\@d, \@tmp, \@d, \@bold, $l);
+	} else {		# right
+	    shr(\@tmp, \@d, $l);
+	    bitcalc(\@d, \@tmp, \@bold, \@d, $l);
+	}
+
+	# print
+	for $i (0..$l) {
+	    printf "%02x", $d[$i];
+	}
+
+	print "\n";
+	next;
+    }
+
+    print;
+
+}
+close F;
+
+if ($verbose != 0 && $max_chars > $verbose_min) {
+    printf STDERR "\r" . rstr(" ", $col - 3) . "\r";
+}
+
+exit 0;
+
+sub shl {
+    my ($dout, $din, $size) = @_;
+    my $c = 0, $d, $i;
+    for ($i = $size; $i >= 0; $i--) {
+	$d = $c;
+	$c = ($din->[$i] & 0x80) >> 7;
+	$dout->[$i] = (($din->[$i] << 1) & 0xff) | $d;
+    }
+}
+
+sub shr {
+    my ($dout, $din, $size) = @_;
+    my $c = 0, $d, $i;
+    for $i (0..$size) {
+	$d = $c;
+	$c = ($din->[$i] & 0x01) << 7;
+	$dout->[$i] = ($din->[$i] >> 1) | $d;
+    }
+}
+
+sub bitcalc {
+    my ($out, $d1, $d2, $d3, $size) = @_;
+    for $i (0..$size) {
+	$out->[$i] = ~$d1->[$i] & $d2->[$i] | $d3->[$i];
+    }
+}
+
+sub rstr # (s, n)
+{
+    my($s, $n) =  @_;
+    my $r = "";
+
+    for (1 .. $n) {
+	$r = $s . $r;
+    }
+    return $r;
+}
--- xfonts-kaname-1.1.orig/debian/rules
+++ xfonts-kaname-1.1/debian/rules
@@ -0,0 +1,108 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+GENBDF=kaname-latin1b.bdf kaname-latin1i.bdf kaname-latin1bi.bdf knm12pi.bdf knm12pbi.bdf knmzn12xi.bdf knmzn12xbi.bdf
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+	# Add here commands to configure the package.
+
+	chmod +x debian/mkbold
+	chmod +x debian/mkitalic
+
+	touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp 
+	dh_testdir
+
+	# mkbold
+	debian/mkbold -V kaname-latin1.bdf > kaname-latin1b.bdf
+
+	# italic
+	debian/mkitalic -V kaname-latin1.bdf > kaname-latin1i.bdf
+	debian/mkitalic -V kaname-latin1b.bdf > kaname-latin1bi.bdf
+
+	debian/mkitalic -V knm12p.bdf > knm12pi.bdf
+	debian/mkitalic -V knm12pb.bdf > knm12pbi.bdf
+
+	debian/mkitalic -V knmzn12x.bdf > knmzn12xi.bdf
+	debian/mkitalic -V knmzn12xb.bdf > knmzn12xbi.bdf
+
+	# make pcf files
+	for FONT in $(GENBDF); do \
+		fontfile=`echo $$FONT | sed -e 's/.bdf//'`; \
+		bdftopcf -o $$fontfile.pcf $$fontfile.bdf; \
+		gzip -9 $$fontfile.pcf; \
+	done
+
+	# Add here commands to compile the package.
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+
+	# Remove generated fonts
+	for FONT in $(GENBDF); do \
+		fontfile=`echo $$FONT | sed -e 's/.bdf//'`; \
+		rm -f $$FONT $$fontfile.pcf $$fontfile.pcf.gz; \
+	done
+
+	dh_clean 
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k 
+	dh_installdirs
+
+	# Add here commands to install the package into debian/xfonts-kaname.
+	install -m 644 *.pcf.gz `pwd`/debian/xfonts-kaname/usr/share/fonts/X11/misc/
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs changes
+	dh_installdocs
+	dh_installexamples gtkrc.sample
+#	dh_install
+#	dh_installmenu
+#	dh_installdebconf	
+#	dh_installlogrotate
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installmime
+#	dh_installinit
+#	dh_installcron
+#	dh_installinfo
+	dh_installxfonts
+	dh_installman
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+#	dh_perl
+#	dh_python
+#	dh_makeshlibs
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary-arch: 
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
--- xfonts-kaname-1.1.orig/debian/copyright
+++ xfonts-kaname-1.1/debian/copyright
@@ -0,0 +1,14 @@
+This package was debianized by Takuo KITAME <kitame@northeye.org> on
+Mon, 11 Oct 1999 00:59:53 +0900.
+
+It was downloaded from <URL:http://www.din.or.jp/~storm/fonts/>
+
+Upstream Authors: Various authors.
+
+Copyright:
+
+GPL.
+
+On Debian GNU/Linux systems you can find a copy of the GPL in
+/usr/share/common-licenses/GPL .
+
--- xfonts-kaname-1.1.orig/debian/mkitalic
+++ xfonts-kaname-1.1/debian/mkitalic
@@ -0,0 +1,419 @@
+#!/usr/bin/gawk -f
+#
+# -- makes BDF font italic
+#     version 0.00.1
+#     programmed by Yasuyuki Furukawa <furukawa@vinelinux.org>
+#			* public domain *
+#
+
+BEGIN {
+  dy = 3;	# level of slant deep (2; Minimam and deepest)
+  correct = 3;	# level of pixel correction
+  debug = 0;
+  verbose = 0;
+  verbose_min = 100;
+
+  # The table for pixel correction
+  # format:
+  #                   before  <- | ->  after
+  #  "height  offset  pattern... | height  offset  pattern... "
+  # if the offset is zero, the pattern starts from last
+  # slant step immidiately.
+
+  # pattern of 'left down to up right'
+  i = 0;
+  if (correct >= 3) {
+      ptable[i++] = "5 -2 ..@  .@   .@   @..  @.   1 -1 .$";  # fixed
+      ptable[i++] = "5 -4 ... @@@. ..@. .@. @. 2 -2 .$, $, ";
+#     ptable[i++] = "5 -1 ...@. ...@. ..@. .@. @. 1 3 @$";    # XXX
+      ptable[i++] = "5 -2 .....@ ....@ ...@. ..@. @@. 1 0 ...@$";
+      ptable[i++] = "4 -3 ...@ ...@ ..@. @@..  1 -1 .$@";
+      ptable[i++] = "4 -3 ..@  ..@  .@.  @..   1  0 @$";
+      ptable[i++] = "4 -1 .@   .@   @..  @.    2 -1 $, ,$";
+      ptable[i++] = "4 -2 ..@  ..@@ @@.. .@.   2 -1 .$@ @@$";
+      ptable[i++] = "4 -2 .@   .@.  @..  @.    2 -1 $, ,$";
+  }
+  if (correct >= 2) {
+      ptable[i++] = "3 -2 ....@. ..@@.   @@... 1  0 @@$...";
+      ptable[i++] = "3 -1 ..@  .@  .@.        1  0 .,$";
+      ptable[i++] = "3 -2 .@   .@   @.@        1 -1 $@";
+      ptable[i++] = "3 -2 .@   .@.  @..        1 -1 $.";
+      ptable[i++] = "3 -2 .@   .@@  @..        1 -1 $@";
+      ptable[i++] = "3 -1 ..@  .@.  @@.        1  0 .,$";
+      ptable[i++] = "3 -2 @@.  .@.  @..        1 -1 $,";
+      ptable[i++] = "3 -1 @.@  .@.  ...        1  0 .@$";
+      ptable[i++] = "3 -1 ..@  .@.  .@@        1  0 .,$";
+#     ptable[i++] = "3 -2 ..@  .@@  @.@        1  0 @$";  # XXX
+  }
+
+
+  # pattern of 'left up to down right'
+  if (correct >= 3) {
+      ptable[i++] = "6 -2 ..@. ...@. ...@. ...@. ..@. @@. 4 -1 ..$, ...@ ..$, .$,";
+      ptable[i++] = "4 -1 @..  @.@  .@.  .@.   1  1 $@";
+      ptable[i++] = "4 -3 @.   @@@  .@   .@    1 -1 $.";
+      ptable[i++] = "4 -3 ..   @@.  ..@. ..@.  2 -2 @, .$,";
+      ptable[i++] = "3 -2 @..  .@   .@         1 -1 $.";
+      ptable[i++] = "4 -1 .@. .@. ..@. ..@. 1 0 .,$";
+      ptable[i++] = "4 -1 .@. @@. ..@. ..@. 2 -1 @, @@$"; # XXX
+  }
+  if (correct >= 2) {
+      ptable[i++] = "3 -1 @..  .@@  ..         1  0 .,@"; #
+      ptable[i++] = "3 -2 @..  @@.  .@         1 -1 $.";
+      ptable[i++] = "3 -2 @.@  .@   .@         1 -1 $@";
+      ptable[i++] = "3 -1 .@.  .@.  ..@.       1  0 ..$";
+#     ptable[i++] = "4 -2 @.   @.   @.  .@@    1  0 $."; # fixed , XXX
+      ptable[i++] = "4 -1 @.   @.   .@@ ..     2  0 ,$ .,$";
+      ptable[i++] = "3 -1 @.   @.   .@@        1  0 ,$";
+      ptable[i++] = "3 -2 ..   @@.  ..@        1 -1 @,.";
+  }
+
+  # least pattern
+  ptable[i++] = "4 -2 ..@ .@  @@@ ..      2 -1 $@ @,@";
+  ptable[i++] = "3 -1 .@.. @.@. .@@.  1 0 $"   # fixed
+  ptable[i++] = "2 -1 .@  @.          1 -1 $";
+ 
+  init();
+}
+
+
+func init(i, tmp)
+{
+#   local i, tmp;
+    flag = 0;		# reading status
+    line[0];		# image buffer
+    if (ARGV[1] == "-h") {
+	usage();
+	exit(0);
+    }
+    if (ARGV[1] == "-V") {
+	verbose = 1;
+	delete ARGV[1];
+    }
+    if (ARGV[1] == "-d") {
+	debug = 1;
+	delete ARGV[1];
+    }
+    if (ARGV[1] == "-D") {
+	debug = 2;
+	delete ARGV[1];
+    }
+    if (ARGV[1] == "-p") {
+	print_ptable();
+	exit(1);
+    }
+
+    vmeter[0] = "|";
+    vmeter[1] = "\\";
+    vmeter[2] = "-";
+    vmeter[3] = "/";
+
+    "stty size 2> /dev/null||true" |getline col;
+    sub(/.* /, "", col);
+    if (col !~ /^[1-9]/ || col < 30)
+	col = 0;
+}
+
+func usage() {
+    printf("usage: mkitalic [-V|-d|-p] {input BDF} > {output BDF}\n");
+    printf("      -V   verbose\n");
+    printf("      -p   output pettern table for pixel correction\n");
+    printf("      -d   debug level 1\n");
+    printf("      -D   debug level 2\n");
+}
+
+#
+# error(str)
+#
+# Print the error message and exit
+# with error state.
+#
+func error(str) {
+    printf(str) > "/dev/stderr";
+    exit(1)
+}
+
+#
+# rstr(s, n)
+#
+# Retern a string that repeats
+# pettern s(string).
+#
+func rstr(s, n, i, r) {
+#   local i, r;
+    r = "";
+    for (i = 0; i < n; i++)
+	r = s r;
+    return r;
+}
+
+#
+# subindex(s, t, i)
+#
+# Serach t(string) in s(string).
+#
+func subindex(s, t, i, n, r) {
+#   local n, r;
+    if (n == 0)
+	n = length(s);
+
+    if (i == 0)
+	return index(s, t);
+
+    r = index(substr(s, i, n), t);
+    if (r != 0)
+	return r + i - 1;
+    else
+	return 0
+}
+
+#
+# replace_substr(s, t, i)
+#
+# Replace a part of s(string)
+# to t(string).
+#
+func replace_substr(s, t, i) {
+    return substr(s, 1, i-1) t substr(s, i + length(t));
+}
+
+
+#
+# correct_pixel(line, width, height)
+#
+# Correct the pixels to make pettern
+# more clear after the slanting.
+# Reference the ptable at the BEGIN
+# routine.
+#
+func correct_pixel(line, width, height, x, y, xx, n, nn, d, dd, i, j) {
+#   local x, y, xx, n, nn, d, dd, i, j;
+    if (correct == 0)
+	return;
+
+    # add padding pixels from both side
+    line[height] = rstr(".", width);
+    for (y = 0; y < height + 1; y ++)
+	sub(/.*/, ".&.", line[y]);
+
+    # pattern matching with ptable
+    for (y = dy; y < height ; y += dy) {
+	for (i = 0; ptable[i]; i++) {
+	    split(ptable[i], p, " ");
+	    n = p[2]; d = p[1];
+	    if (y+n < 0 || y+n+d > height + 1)
+		continue;
+	    for (x = 1; x < width && x > 0; x++) {
+		x = subindex(line[y+n], p[3], x);
+		if (x == 0) break;
+		for (j = 1; j < d; j++) {
+		    xx = subindex(line[y+n+j], p[j+3], x);
+		    if (x != xx) break;
+		}
+		if (x == xx) {	# matched !
+		    if (debug > 1)
+			print "$$$$ MATCH with " i " $$$$ (" x ", " y ")";
+		    nn = p[d+4]; dd = p[d+3];
+		    for (j = 0; j < dd; j++)
+			line[y+nn+j] = replace_substr(line[y+nn+j], p[j+d+5], x);
+		    break;
+		}
+	    }
+	}
+    }
+
+    # delete padding pixels from both side
+    for (y = 0; y < height; y ++) {
+      	sub(/^\./, "", line[y]);
+	sub(/\.$/, "", line[y]);
+    }
+}
+
+#
+# make_slant(line, width, height)
+#
+# Just slant the pattern of font.
+#
+func make_slant(line, width, height, y, i, dcount, ncount, tp, ts, te) {
+#   local y, i, dcount, ncuont, tp, ts, te;
+    dcount = dx;
+    ncount = 0;
+    tp = rstr("#", pad);
+
+    for (y = 0; y < height; y++) {
+	if (y % dy == 0) {
+	    ts = rstr( "#", dcount-- - 1);
+	    te = rstr( "#", ncount++) tp;
+	}
+        line[y] = ts substr(line[y], 1, width) te;
+    }
+}
+
+
+#
+# print_ptable()
+#
+# Visualize ptable.
+#
+func print_ptable(i, j, n, d, nn,dd, p, pp) {
+#   local i, j, n, d, nn,dd, p, pp;
+
+    printf("\t#### PATTERN TABLE ####\n");
+    printf("\nFollowing patterns is for pixel correction in slant.\n");
+    printf("Priority between patterns depends on pattern ID.\n");
+
+    for (i = 0; ptable[i]; i++) {
+	split(ptable[i], p, " ");
+	n = p[2]; d = p[1];
+	for (j = 0; j < d; j++)
+	    pp[j] = p[j+3];
+
+	nn = p[d+4]; dd = p[d+3];
+	for (j = 0; j < dd; j++)
+	    p[-n+nn+3+j] = replace_substr(p[-n+nn+3+j], p[j+d+5], 1);
+
+	printf("\n\t--- pattern " i " ---\n\n");
+	for (j = 0; j < d; j++) {
+	    printf(" " pp[j]);
+	    printf(rstr(" ", 7 - length(pp[j])));
+	    if (j == int(d/2))
+		printf(" ==>    ");
+	    else
+		printf("        ");
+
+	    if (j +n < dy) printf(" ");
+	    if (j +n < 0) printf(" ");
+	    printf(pp[j]);
+
+	    printf(rstr(" ", 7 - length(pp[j])));
+	    if (j == int(d/2))
+		printf(" ==>    ");
+	    else
+		printf("        ");
+
+	    printf(p[j+3] "\n");
+	}
+    }
+}
+
+END {
+    if (verbose != 0 && max_chars > verbose_min)
+	printf "\r" rstr(" ", col - 3) "\r" > "/dev/stderr";
+    exit(0);
+}
+
+#
+# MAIN LOOP
+#
+# All of the follows is the main
+# loop routine.
+#
+
+# Change the font property
+/^FONT[ \t]/ {
+    tmp = gsub(/-[R|r]-/, "-I-", $2);
+    if (tmp == 0)
+	error("error: the input font is already italic.\n");
+}
+
+# Change the font property
+/^SLANT[ \t]/ {
+    sub( /\042[R|r]\042/,  "\042I\042", $2);
+}
+
+# Get the metric information from the bounding box.
+/^BBX[ \t]/ {
+    height = $3;
+    width  = $2;
+    dx     = int((height + dy - 1)/dy);
+    if (height > 0 && width > 0) {
+	$2  = $2 + dx - 1;
+	$4  = $4 - int((dx -1)/2);
+	pad = (8 - ($2 % 8)) % 8;
+    } else
+	pad = 0;
+}
+
+# Get the number of characters.
+/^CHARS[ \t]/ {
+    max_chars = $2;
+}
+
+# Change inner state.
+/^BITMAP/ {
+    flag = 1;
+    count = 0;
+    print $0;
+    next;
+}
+
+# Modify the every font pattern.
+/^ENDCHAR/ {
+    # correct pixel as pre-processing
+    correct_pixel(line, width, height);
+
+    # make simple slant font
+    make_slant(line, width, height);
+
+    # output font image
+    for (y = 0; y < height; y ++) {
+	if (debug == 0) {
+	    gsub(/#/,  ".", line[y]);
+	    gsub(/,/,  ".", line[y]);
+	    gsub(/\$/, "@", line[y]);
+	    gsub(/[.@][.@][.@][.@]/, "&_", line[y]);
+	    gsub(/\.\.\.\._/,"0", line[y]);
+	    gsub(/\.\.\.@_/, "1", line[y]);
+	    gsub(/\.\.@\._/, "2", line[y]);
+	    gsub(/\.\.@@_/,  "3", line[y]);
+	    gsub(/\.@\.\._/, "4", line[y]);
+	    gsub(/\.@\.@_/,  "5", line[y]);
+	    gsub(/\.@@\._/,  "6", line[y]);
+	    gsub(/\.@@@_/,   "7", line[y]);
+	    gsub(/@\.\.\._/, "8", line[y]);
+	    gsub(/@\.\.@_/,  "9", line[y]);
+	    gsub(/@\.@\._/,  "A", line[y]);
+	    gsub(/@\.@@_/,   "B", line[y]);
+	    gsub(/@@\.\._/,  "C", line[y]);
+	    gsub(/@@\.@_/,   "D", line[y]);
+	    gsub(/@@@\._/,   "E", line[y]);
+	    gsub(/@@@@_/,    "F", line[y]);
+	}
+	print line[y];
+    }
+
+    # Display progress bar in verbose mode
+    ch_count++
+    if (verbose != 0 && max_chars > verbose_min) {
+	n = int(ch_count * 100 / max_chars);
+	m = int(n * (col - 21) / 100);
+	l = col - 20 - m;
+	printf "\rprogress|" rstr("=", m) rstr(" ", l) n "%%" vmeter[ch_count % 4]  > "/dev/stderr";
+    }
+
+    flag = 0;
+}
+
+# Default
+{
+    if (flag > 0) {
+	gsub(/0/,   "....");
+	gsub(/1/,   "...@");
+	gsub(/2/,   "..@.");
+	gsub(/3/,   "..@@");
+	gsub(/4/,   ".@..");
+	gsub(/5/,   ".@.@");
+	gsub(/6/,   ".@@.");
+	gsub(/7/,   ".@@@");
+	gsub(/8/,   "@...");
+	gsub(/9/,   "@..@");
+	gsub(/A|a/, "@.@.");
+	gsub(/B|b/, "@.@@");
+	gsub(/C|c/, "@@..");
+	gsub(/D|d/, "@@.@");
+	gsub(/E|e/, "@@@.");
+	gsub(/F|f/, "@@@@");
+	line[count++] = $0;
+    } else
+	print $0;
+}
--- xfonts-kaname-1.1.orig/debian/compat
+++ xfonts-kaname-1.1/debian/compat
@@ -0,0 +1 @@
+4
