#!/usr/bin/perl -s =head1 NAME umkcidtfm.pl =head1 USAGE script/umkcidtfm.pl script/umkcidtfm.pl -debug =head1 NOTE This software is a part of japanese-otf-uptex. =cut opendir(PL, "pl") || mkdir("pl",0755) || die "cannot mkdir pl"; opendir(TFM, "tfm") || mkdir("tfm",0755) || die "cannot mkdir tfm"; &make_cid_tfm; &make_cid_dvips_tfm; sub make_cid_tfm { my ($lang, $face, $dir, $id, $filename); foreach $lang (qw/j c k t/){#lang foreach $dir (qw/h v/){#direction $id='-'; $pl_name="cid$lang$id-$dir"; open(OUT, '>', "pl/$pl_name.pl")||die "$!"; &fonthead($lang,$dir); &writechar($lang,$dir); &fontfoot($lang,$dir); close(OUT); foreach $face (qw/mr gr mb gb mgr ml ge/){#face $tfm_name="cid$lang$face$id-$dir"; system("uppltotf -kanji=uptex pl/$pl_name.pl tfm/$tfm_name.tfm"); } unless ($debug){ unlink "pl/$pl_name.pl"; } } } } sub make_cid_dvips_tfm { my ($lang, $face, $dir, $id, $filename); foreach $lang (qw/j c k t/){#lang foreach $dir (qw/h v/){#direction $pl_name="otf-c$lang-$dir"; open(OUT, '>', "pl/$pl_name.pl")||die "$!"; &fonthead_dvips($lang,$dir); &writechar($lang,$dir); &fontfoot($lang,$dir); close(OUT); foreach $face (qw/mr gr mb gb mgr ml ge/){#face $tfm_name="otf-c$lang$face-$dir"; system("uppltotf -kanji=uptex pl/$pl_name.pl tfm/$tfm_name.tfm"); } unless ($debug){ unlink "pl/$pl_name.pl"; } } } } sub fonthead { my ($lang,$dir) = @_; print OUT <