--- xfonts-ayu-1.7+0a+0debian1.orig/debian/rules
+++ xfonts-ayu-1.7+0a+0debian1/debian/rules
@@ -0,0 +1,165 @@
+#!/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
+
+export TARGET_ARCHIVE_18m = ayu18mincho-1.1.tar.gz
+export TARGET_ARCHIVE_18g = ayu18gothic-1.3a.tar.gz
+export TARGET_ARCHIVE_20g = ayu20gothic-1.7a.tar.gz
+export TARGET_ARCHIVE = $(TARGET_ARCHIVE_20g) $(TARGET_ARCHIVE_18g) $(TARGET_ARCHIVE_18m)
+export DIR_18m = ayu18mincho
+export DIR_18g = ayu18gothic
+export DIR_20g = ayu20gothic
+export DIR_all = $(DIR_18m) $(DIR_18g) $(DIR_20g)
+
+configure: configure-stamp
+configure-stamp:
+ dh_testdir
+ # Add here commands to configure the package.
+
+ # unpack original package
+ mkdir $(DIR_18m)
+ tar -zxvf $(TARGET_ARCHIVE_18m) -C $(DIR_18m)
+ mkdir $(DIR_18g)
+ tar -zxvf $(TARGET_ARCHIVE_18g) -C $(DIR_18g)
+ mkdir $(DIR_20g)
+ tar -zxvf $(TARGET_ARCHIVE_20g) -C $(DIR_20g)
+
+ chmod +x debian/mkbold
+ chmod +x debian/mkitalic
+
+ touch configure-stamp
+
+build: build-stamp
+
+build-stamp: configure-stamp
+ dh_testdir
+
+ # Add here commands to compile the package.
+ # make italic and bold
+ # a18m
+ debian/mkbold -V $(DIR_18m)/9x18m.bdf > $(DIR_18m)/9x18mb.bdf
+ debian/mkbold -V $(DIR_18m)/9x18rkm.bdf > $(DIR_18m)/9x18rkmb.bdf
+ debian/mkbold -V $(DIR_18m)/k18m.bdf > $(DIR_18m)/k18mb.bdf
+
+ debian/mkitalic -V $(DIR_18m)/9x18m.bdf > $(DIR_18m)/9x18mi.bdf
+ debian/mkitalic -V $(DIR_18m)/9x18rkm.bdf > $(DIR_18m)/9x18rkmi.bdf
+ debian/mkitalic -V $(DIR_18m)/k18m.bdf > $(DIR_18m)/k18mi.bdf
+
+ debian/mkbold -V $(DIR_18m)/9x18mi.bdf > $(DIR_18m)/9x18mbi.bdf
+ debian/mkbold -V $(DIR_18m)/9x18rkmi.bdf > $(DIR_18m)/9x18rkmbi.bdf
+ debian/mkbold -V $(DIR_18m)/k18mi.bdf > $(DIR_18m)/k18mbi.bdf
+
+ #debian/mkitalic -V $(DIR_18m)/9x18mb.bdf > $(DIR_18m)/9x18mbi.bdf
+ #debian/mkitalic -V $(DIR_18m)/9x18rkmb.bdf > $(DIR_18m)/9x18rkmbi.bdf
+ #debian/mkitalic -V $(DIR_18m)/k18mb.bdf > $(DIR_18m)/k18mbi.bdf
+
+ # a18g
+ debian/mkbold -V $(DIR_18g)/9x18gm.bdf > $(DIR_18g)/9x18gmb.bdf
+ debian/mkbold -V $(DIR_18g)/9x18grkm.bdf > $(DIR_18g)/9x18grkmb.bdf
+ debian/mkbold -V $(DIR_18g)/k18gm.bdf > $(DIR_18g)/k18gmb.bdf
+
+ debian/mkitalic -V $(DIR_18g)/9x18gm.bdf > $(DIR_18g)/9x18gmi.bdf
+ debian/mkitalic -V $(DIR_18g)/9x18grkm.bdf > $(DIR_18g)/9x18grkmi.bdf
+ debian/mkitalic -V $(DIR_18g)/k18gm.bdf > $(DIR_18g)/k18gmi.bdf
+
+ debian/mkbold -V $(DIR_18g)/9x18gmi.bdf > $(DIR_18g)/9x18gmbi.bdf
+ debian/mkbold -V $(DIR_18g)/9x18grkmi.bdf > $(DIR_18g)/9x18grkmbi.bdf
+ debian/mkbold -V $(DIR_18g)/k18gmi.bdf > $(DIR_18g)/k18gmbi.bdf
+
+ #debian/mkitalic -V $(DIR_18g)/9x18gmb.bdf > $(DIR_18g)/9x18gmbi.bdf
+ #debian/mkitalic -V $(DIR_18g)/9x18grkmb.bdf > $(DIR_18g)/9x18grkmbi.bdf
+ #debian/mkitalic -V $(DIR_18g)/k18gmb.bdf > $(DIR_18g)/k18gmbi.bdf
+
+ # a20g
+ debian/mkbold -V $(DIR_20g)/10x20gm.bdf > $(DIR_20g)/10x20gmb.bdf
+ debian/mkbold -V $(DIR_20g)/10x20grkm.bdf > $(DIR_20g)/10x20grkmb.bdf
+ debian/mkbold -V $(DIR_20g)/k20gm.bdf > $(DIR_20g)/k20gmb.bdf
+
+ debian/mkitalic -V $(DIR_20g)/10x20gm.bdf > $(DIR_20g)/10x20gmi.bdf
+ debian/mkitalic -V $(DIR_20g)/10x20grkm.bdf > $(DIR_20g)/10x20grkmi.bdf
+ debian/mkitalic -V $(DIR_20g)/k20gm.bdf > $(DIR_20g)/k20gmi.bdf
+
+ debian/mkbold -V $(DIR_20g)/10x20gmi.bdf > $(DIR_20g)/10x20gmbi.bdf
+ debian/mkbold -V $(DIR_20g)/10x20grkmi.bdf > $(DIR_20g)/10x20grkmbi.bdf
+ debian/mkbold -V $(DIR_20g)/k20gmi.bdf > $(DIR_20g)/k20gmbi.bdf
+
+ #debian/mkitalic -V $(DIR_20g)/10x20gmb.bdf > $(DIR_20g)/10x20gmbi.bdf
+ #debian/mkitalic -V $(DIR_20g)/10x20grkmb.bdf > $(DIR_20g)/10x20grkmbi.bdf
+ #debian/mkitalic -V $(DIR_20g)/k20gmb.bdf > $(DIR_20g)/k20gmbi.bdf
+
+ # make pcf files
+ for dirs in $(DIR_all); do \
+ for FONT in $$dirs/*.bdf; do \
+ fontfile=`echo $$FONT | sed -e 's/.bdf//'`; \
+ bdftopcf -o $$fontfile.pcf $$fontfile.bdf; \
+ gzip -9 $$fontfile.pcf; \
+ done; \
+ done
+
+ touch build-stamp
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ # Add here commands to clean up after the build process.
+ rm -rf $(DIR_all)
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ # Add here commands to install the package into debian/xfonts-ayu.
+ for dirs in $(DIR_all); do \
+ install -m 644 $$dirs/*.pcf.gz debian/xfonts-ayu/usr/share/fonts/X11/misc/; \
+ done
+ install -m 644 debian/xfonts-ayu.alias debian/xfonts-ayu/etc/X11/fonts/X11R7/misc/
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+# dh_install
+# dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+# dh_installinit
+# dh_installcron
+# dh_installinfo
+# dh_installman
+ dh_installxfonts
+ dh_link
+# dh_strip
+ dh_compress
+ dh_fixperms
+# dh_perl
+# dh_python
+# dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# Build architecture-dependent files here.
+binary-arch: build install
+# We have nothing to do.
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
--- xfonts-ayu-1.7+0a+0debian1.orig/debian/dirs
+++ xfonts-ayu-1.7+0a+0debian1/debian/dirs
@@ -0,0 +1,3 @@
+usr/share/fonts/X11/misc
+etc/X11/fonts/X11R7/misc
+usr/share/doc/xfonts-ayu
--- xfonts-ayu-1.7+0a+0debian1.orig/debian/control
+++ xfonts-ayu-1.7+0a+0debian1/debian/control
@@ -0,0 +1,16 @@
+Source: xfonts-ayu
+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.6.2
+
+Package: xfonts-ayu
+Architecture: all
+Depends: ${misc:Depends}
+Suggests: xfs | xserver
+Description: Gothic 18/20 dot Japanese and ISO-8859-1 X11 bitmap fonts
+ This package includes Japanese (jisx0208.1990, jisx0201.1976) and
+ ISO-8859-1 bitmap fonts for X Window System with Ayu gothic 18 dot, Ayu
+ gothic 20 dot and Ayu mincho 18x18 dot fonts.
--- xfonts-ayu-1.7+0a+0debian1.orig/debian/docs
+++ xfonts-ayu-1.7+0a+0debian1/debian/docs
@@ -0,0 +1 @@
+ayu20gothic/README.txt
--- xfonts-ayu-1.7+0a+0debian1.orig/debian/mkbold
+++ xfonts-ayu-1.7+0a+0debian1/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-ayu-1.7+0a+0debian1.orig/debian/copyright
+++ xfonts-ayu-1.7+0a+0debian1/debian/copyright
@@ -0,0 +1,10 @@
+This package was debianized by GOTO Masanori <gotom@debian.org> on
+Sat, 22 Nov 2003 19:14:56 +0900.
+
+It was downloaded from http://x-tt.sourceforge.jp/ayu.html
+
+Upstream Author: Chisato Yamauchi <cyamauch@hst.phyas.aichi-edu.ac.jp>
+
+Copyright:
+
+ Public Domain.
--- xfonts-ayu-1.7+0a+0debian1.orig/debian/compat
+++ xfonts-ayu-1.7+0a+0debian1/debian/compat
@@ -0,0 +1 @@
+4
--- xfonts-ayu-1.7+0a+0debian1.orig/debian/mkitalic
+++ xfonts-ayu-1.7+0a+0debian1/debian/mkitalic
@@ -0,0 +1,419 @@
+#!/usr/bin/gawk --exec
+#
+# -- 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-ayu-1.7+0a+0debian1.orig/debian/xfonts-ayu.alias
+++ xfonts-ayu-1.7+0a+0debian1/debian/xfonts-ayu.alias
@@ -0,0 +1,49 @@
+! xfonts-ayu gothic20 jisx0208.1990 -> jix0208.1983 fall back alias
+-Ayu-Gothic-Medium-R-Normal--20-190-75-75-C-200-JISX0208.1983-0 -Ayu-Gothic-Medium-R-Normal--20-190-75-75-C-200-JISX0208.1990-0
+-Ayu-Gothic-Bold-R-Normal--20-190-75-75-C-200-JISX0208.1983-0 -Ayu-Gothic-Bold-R-Normal--20-190-75-75-C-200-JISX0208.1990-0
+-Ayu-Gothic-Medium-I-Normal--20-190-75-75-C-200-JISX0208.1983-0 -Ayu-Gothic-Medium-I-Normal--20-190-75-75-C-200-JISX0208.1990-0
+-Ayu-Gothic-Bold-I-Normal--20-190-75-75-C-200-JISX0208.1983-0 -Ayu-Gothic-Bold-I-Normal--20-190-75-75-C-200-JISX0208.1990-0
+
+! xfonts-ayu gothic18 jisx0208.1990 -> jix0208.1983 fall back alias
+-Ayu-Gothic-Medium-R-Normal--18-170-75-75-C-180-JISX0208.1983-0 -Ayu-Gothic-Medium-R-Normal--18-170-75-75-C-180-JISX0208.1990-0
+-Ayu-Gothic-Bold-R-Normal--18-170-75-75-C-180-JISX0208.1983-0 -Ayu-Gothic-Bold-R-Normal--18-170-75-75-C-180-JISX0208.1990-0
+-Ayu-Gothic-Medium-I-Normal--18-170-75-75-C-180-JISX0208.1983-0 -Ayu-Gothic-Medium-I-Normal--18-170-75-75-C-180-JISX0208.1990-0
+-Ayu-Gothic-Bold-I-Normal--18-170-75-75-C-180-JISX0208.1983-0 -Ayu-Gothic-Bold-I-Normal--18-170-75-75-C-180-JISX0208.1990-0
+
+! xfonts-ayu Mincho18 jisx0208.1990 -> jix0208.1983 fall back alias
+-Ayu-Mincho-Medium-R-Normal--18-170-75-75-C-180-JISX0208.1983-0 -Ayu-Mincho-Medium-R-Normal--18-170-75-75-C-180-JISX0208.1990-0
+-Ayu-Mincho-Bold-R-Normal--18-170-75-75-C-180-JISX0208.1983-0 -Ayu-Mincho-Bold-R-Normal--18-170-75-75-C-180-JISX0208.1990-0
+-Ayu-Mincho-Medium-I-Normal--18-170-75-75-C-180-JISX0208.1983-0 -Ayu-Mincho-Medium-I-Normal--18-170-75-75-C-180-JISX0208.1990-0
+-Ayu-Mincho-Bold-I-Normal--18-170-75-75-C-180-JISX0208.1983-0 -Ayu-Mincho-Bold-I-Normal--18-170-75-75-C-180-JISX0208.1990-0
+
+! xfonts-ayu short name alias
+k20g -Ayu-Gothic-Medium-R-Normal--20-190-75-75-C-200-JISX0208.1990-0
+k20gb -Ayu-Gothic-Bold-R-Normal--20-190-75-75-C-200-JISX0208.1990-0
+k20gi -Ayu-Gothic-Medium-I-Normal--20-190-75-75-C-200-JISX0208.1990-0
+k20gbi -Ayu-Gothic-Bold-I-Normal--20-190-75-75-C-200-JISX0208.1990-0
+r20 -Ayu-Gothic-Medium-R-Normal--20-190-75-75-C-100-ISO8859-1
+r20b -Ayu-Gothic-Bold-R-Normal--20-190-75-75-C-100-ISO8859-1
+r20i -Ayu-Gothic-Medium-I-Normal--20-190-75-75-C-100-ISO8859-1
+r20bi -Ayu-Gothic-Bold-I-Normal--20-190-75-75-C-100-ISO8859-1
+rk20 -Ayu-Gothic-Medium-R-Normal--20-190-75-75-C-100-JISX0201.1976-0
+rk20b -Ayu-Gothic-Bold-R-Normal--20-190-75-75-C-100-JISX0201.1976-0
+rk20i -Ayu-Gothic-Medium-I-Normal--20-190-75-75-C-100-JISX0201.1976-0
+rk20bi -Ayu-Gothic-Bold-I-Normal--20-190-75-75-C-100-JISX0201.1976-0
+
+! xfonts-ayu -misc-* alias (including above fall back to jisx0208.1983)
+-Misc-Gothic-Medium-R-Normal--20-190-75-75-C-200-JISX0208.1990-0 -Ayu-Gothic-Medium-R-Normal--20-190-75-75-C-200-JISX0208.1990-0
+-Misc-Gothic-Medium-R-Normal--20-190-75-75-C-200-JISX0208.1983-0 -Ayu-Gothic-Medium-R-Normal--20-190-75-75-C-200-JISX0208.1990-0
+-Misc-Gothic-Bold-R-Normal--20-190-75-75-C-200-JISX0208.1990-0 -Ayu-Gothic-Bold-R-Normal--20-190-75-75-C-200-JISX0208.1990-0
+-Misc-Gothic-Bold-R-Normal--20-190-75-75-C-200-JISX0208.1983-0 -Ayu-Gothic-Bold-R-Normal--20-190-75-75-C-200-JISX0208.1990-0
+-Misc-Gothic-Medium-I-Normal--20-190-75-75-C-200-JISX0208.1990-0 -Ayu-Gothic-Medium-I-Normal--20-190-75-75-C-200-JISX0208.1990-0
+-Misc-Gothic-Medium-I-Normal--20-190-75-75-C-200-JISX0208.1983-0 -Ayu-Gothic-Medium-I-Normal--20-190-75-75-C-200-JISX0208.1990-0
+-Misc-Gothic-Bold-I-Normal--20-190-75-75-C-200-JISX0208.1990-0 -Ayu-Gothic-Bold-I-Normal--20-190-75-75-C-200-JISX0208.1990-0
+-Misc-Gothic-Bold-I-Normal--20-190-75-75-C-200-JISX0208.1983-0 -Ayu-Gothic-Bold-I-Normal--20-190-75-75-C-200-JISX0208.1990-0
+-Misc-Gothic-Medium-R-Normal--20-190-75-75-C-100-ISO8859-1 -Ayu-Gothic-Medium-R-Normal--20-190-75-75-C-100-ISO8859-1
+-Misc-Gothic-Bold-R-Normal--20-190-75-75-C-100-ISO8859-1 -Ayu-Gothic-Bold-R-Normal--20-190-75-75-C-100-ISO8859-1
+-Misc-Gothic-Medium-I-Normal--20-190-75-75-C-100-ISO8859-1 -Ayu-Gothic-Medium-I-Normal--20-190-75-75-C-100-ISO8859-1
+-Misc-Gothic-Bold-I-Normal--20-190-75-75-C-100-ISO8859-1 -Ayu-Gothic-Bold-I-Normal--20-190-75-75-C-100-ISO8859-1
+-Misc-Gothic-Medium-R-Normal--20-190-75-75-C-100-JISX0201.1976-0 -Ayu-Gothic-Medium-R-Normal--20-190-75-75-C-100-JISX0201.1976-0
+-Misc-Gothic-Bold-R-Normal--20-190-75-75-C-100-JISX0201.1976-0 -Ayu-Gothic-Bold-R-Normal--20-190-75-75-C-100-JISX0201.1976-0
+-Misc-Gothic-Medium-I-Normal--20-190-75-75-C-100-JISX0201.1976-0 -Ayu-Gothic-Medium-I-Normal--20-190-75-75-C-100-JISX0201.1976-0
+-Misc-Gothic-Bold-I-Normal--20-190-75-75-C-100-JISX0201.1976-0 -Ayu-Gothic-Bold-I-Normal--20-190-75-75-C-100-JISX0201.1976-0
--- xfonts-ayu-1.7+0a+0debian1.orig/debian/changelog
+++ xfonts-ayu-1.7+0a+0debian1/debian/changelog
@@ -0,0 +1,60 @@
+xfonts-ayu (1.7+0a+0debian1-2.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * debian/mkitalic: Use "#!/usr/bin/gawk --exec" so that gawk (>= 3.1.5)
+ doesn't process script options as its own. Closes: #669561.
+
+ -- Matej Vela <vela@debian.org> Sun, 27 May 2012 14:22:04 +0100
+
+xfonts-ayu (1.7+0a+0debian1-2) unstable; urgency=low
+
+ * debian/control: Use Build-Depends-Indep: xfonts-utils instead of xutils.
+
+ -- GOTO Masanori <gotom@debian.org> Sun, 7 May 2006 02:36:24 +0900
+
+xfonts-ayu (1.7+0a+0debian1-1) unstable; urgency=low
+
+ * Update Standards-Version.
+ * Add Build-Depends to debian/control.
+ * Fix lintian's copyright boilerplate error.
+
+ -- GOTO Masanori <gotom@debian.org> Sun, 7 May 2006 00:50:00 +0900
+
+xfonts-ayu (1.7+0a+0debian1-0.1) unstable; urgency=low
+
+ * NMU (acknowledged by gotom on IRC)
+ * adapt new X fonts directory structure, closes: #362341
+ - 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
+ * regenerate orig.tar.gz (this is not native debian package)
+
+ -- ISHIKAWA Mutsumi <ishikawa@debian.org> Wed, 26 Apr 2006 01:21:16 +0900
+
+xfonts-ayu (1.7+0a-1) unstable; urgency=low
+
+ * New upstream release (ayu20gothic 1.7a).
+ * add ayu18gothic 1.3a, ayu18mincho 1.1.
+
+ -- GOTO Masanori <gotom@debian.org> Sat, 27 Mar 2004 20:36:11 +0900
+
+xfonts-ayu (1.4-1.1) unstable; urgency=low
+
+ * NMU at request of maintainer.
+ * Fix permissions of debian/{mkbold,mkitalic} before executing them.
+ Closes: #232836.
+ * Add gawk to Build-Depends-Indep.
+ * Provide (empty) binary-arch target.
+ * Fix debian/mkitalic script not to fail if stdin and stdout are
+ both redirected.
+
+ -- Daniel Schepler <schepler@debian.org> Mon, 16 Feb 2004 01:18:41 -0800
+
+xfonts-ayu (1.4-1) unstable; urgency=low
+
+ * Initial Release.
+
+ -- GOTO Masanori <gotom@debian.or.jp> Sat, 22 Nov 2003 19:14:56 +0900
+