diff options
author | Karl Berry <karl@freefriends.org> | 2020-11-14 22:15:20 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-11-14 22:15:20 +0000 |
commit | 5622d8475184e19eaec3342dc3b3362f1f1e04c8 (patch) | |
tree | bb161f1038cb0dde975c14d198aa18336a5b7da7 /Master/texmf-dist/source | |
parent | 41de1e5120870c2ce046895debaabc76d2e428bc (diff) |
japanese-otf-uptex (14nov20)
git-svn-id: svn://tug.org/texlive/trunk@56932 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
9 files changed, 235 insertions, 60 deletions
diff --git a/Master/texmf-dist/source/fonts/japanese-otf-uptex/script/mktfm_sp.pl b/Master/texmf-dist/source/fonts/japanese-otf-uptex/script/mktfm_sp.pl index 99485c83ef1..90f464d13ad 100755 --- a/Master/texmf-dist/source/fonts/japanese-otf-uptex/script/mktfm_sp.pl +++ b/Master/texmf-dist/source/fonts/japanese-otf-uptex/script/mktfm_sp.pl @@ -24,6 +24,61 @@ $multi=3; @dvips_tfm_h=(0x00, 0x0B, 0x00, 0x01, 0x00, 0x1B, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x14, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xEB, 0x85, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); @dvips_tfm_v=(0x00, 0x09, 0x00, 0x01, 0x00, 0x1B, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); +@tex_tfm_ucs_h=map{ hex($_) } qw/ + 00 0b 00 40 00 6c 00 12 00 00 00 01 00 03 00 02 + 00 02 00 01 00 00 00 00 00 00 00 09 00 00 00 00 + 00 a0 00 00 0e 54 45 58 20 4b 41 4e 4a 49 20 54 + 45 58 54 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 09 4f 54 46 + 20 4b 41 4e 4a 49 00 00 00 00 00 00 00 00 00 00 + 80 00 00 00 00 00 00 00 ff 61 00 01 ff 62 00 01 + ff 63 00 01 ff 64 00 01 ff 65 00 01 ff 66 00 01 + ff 67 00 01 ff 68 00 01 ff 69 00 01 ff 6a 00 01 + ff 6b 00 01 ff 6c 00 01 ff 6d 00 01 ff 6e 00 01 + ff 6f 00 01 ff 70 00 01 ff 71 00 01 ff 72 00 01 + ff 73 00 01 ff 74 00 01 ff 75 00 01 ff 76 00 01 + ff 77 00 01 ff 78 00 01 ff 79 00 01 ff 7a 00 01 + ff 7b 00 01 ff 7c 00 01 ff 7d 00 01 ff 7e 00 01 + ff 7f 00 01 ff 80 00 01 ff 81 00 01 ff 82 00 01 + ff 83 00 01 ff 84 00 01 ff 85 00 01 ff 86 00 01 + ff 87 00 01 ff 88 00 01 ff 89 00 01 ff 8a 00 01 + ff 8b 00 01 ff 8c 00 01 ff 8d 00 01 ff 8e 00 01 + ff 8f 00 01 ff 90 00 01 ff 91 00 01 ff 92 00 01 + ff 93 00 01 ff 94 00 01 ff 95 00 01 ff 96 00 01 + ff 97 00 01 ff 98 00 01 ff 99 00 01 ff 9a 00 01 + ff 9b 00 01 ff 9c 00 01 ff 9d 00 01 ff 9e 00 01 + ff 9f 00 01 02 11 00 00 01 11 00 00 00 00 00 00 + 00 08 00 00 00 10 00 00 00 00 00 00 00 0e 14 7b + 00 00 00 00 00 01 eb 85 00 00 00 00 00 00 00 00 + 00 00 00 00 00 01 99 9a 00 00 00 00 00 10 00 00 + 00 10 00 00 00 04 00 00 00 03 33 33 00 02 00 00 +/; +@dvips_tfm_ucs_h=map{ hex($_) } qw/ + 00 0b 00 40 00 5c 00 02 00 00 00 01 00 03 00 02 + 00 02 00 01 00 00 00 00 00 00 00 09 00 00 00 00 + 00 a0 00 00 00 00 00 00 ff 61 00 01 ff 62 00 01 + ff 63 00 01 ff 64 00 01 ff 65 00 01 ff 66 00 01 + ff 67 00 01 ff 68 00 01 ff 69 00 01 ff 6a 00 01 + ff 6b 00 01 ff 6c 00 01 ff 6d 00 01 ff 6e 00 01 + ff 6f 00 01 ff 70 00 01 ff 71 00 01 ff 72 00 01 + ff 73 00 01 ff 74 00 01 ff 75 00 01 ff 76 00 01 + ff 77 00 01 ff 78 00 01 ff 79 00 01 ff 7a 00 01 + ff 7b 00 01 ff 7c 00 01 ff 7d 00 01 ff 7e 00 01 + ff 7f 00 01 ff 80 00 01 ff 81 00 01 ff 82 00 01 + ff 83 00 01 ff 84 00 01 ff 85 00 01 ff 86 00 01 + ff 87 00 01 ff 88 00 01 ff 89 00 01 ff 8a 00 01 + ff 8b 00 01 ff 8c 00 01 ff 8d 00 01 ff 8e 00 01 + ff 8f 00 01 ff 90 00 01 ff 91 00 01 ff 92 00 01 + ff 93 00 01 ff 94 00 01 ff 95 00 01 ff 96 00 01 + ff 97 00 01 ff 98 00 01 ff 99 00 01 ff 9a 00 01 + ff 9b 00 01 ff 9c 00 01 ff 9d 00 01 ff 9e 00 01 + ff 9f 00 01 02 11 00 00 01 11 00 00 00 00 00 00 + 00 08 00 00 00 10 00 00 00 00 00 00 00 0e 14 7b + 00 00 00 00 00 01 eb 85 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00 00 + 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +/; + opendir(TFM, "tfm") || mkdir("tfm",0755) || die "cannot mkdir tfm"; my @face = qw/mr gr mb gb mgr ml ge/; @@ -40,7 +95,16 @@ my %font_id = qw/1b g 1d h 1e i 1f j &make_unified_utf_tfm; sub make_utf_tfm { - foreach $lang ($lang[0]){ #language + foreach $lang ($lang[0]){ #language, japanase + foreach $newjis ('', 'n') { + foreach $face (@face){ #face + $face0 = $face.$newjis; + foreach $dir (@dir){ #direction + &make_dvipstfm_body($face0, $dir, $lang) if ($dir=='h'); + &make_ucs_tfm_body($face0, $dir, $lang); + } + } + } foreach $face (@face){ #face foreach $dir (@dir){ #direction &maketfm_body($face, $dir, $lang); @@ -49,7 +113,13 @@ sub make_utf_tfm { } } sub make_multi_utf_tfm { - foreach $lang (@lang[1..$multi]){ #language + foreach $lang (@lang[1..$multi]){ #language, t c k + foreach $face (@face){ #face + foreach $dir (@dir){ #direction + &make_dvipstfm_body($face, $dir, $lang); + &make_ucs_tfm_body($face, $dir, $lang); + } + } foreach $face (@face[0..1]){ #face foreach $dir (@dir){ #direction &maketfm_body($face, $dir, $lang); @@ -85,7 +155,7 @@ sub maketfm_body { foreach $first_hex (0x1b, 0x1d .. 0x2f) { # U+1Cxxx : not defined yet next if (!$exist_head[$first_hex]); - $id = $font_id{sprintf("%x", $first_hex)}; + $id = $font_id{sprintf("%02x", $first_hex)}; $filename= (@ln>1) ? "utf$face$id-$dir" : "utf$lang$face$id-$dir"; open(TEXTFM,">tfm/$filename.tfm") || die "Can't make \'tfm/$filename.tfm\'!\n"; binmode(TEXTFM); @@ -97,3 +167,54 @@ sub maketfm_body { close(TEXTFM); } } + +sub make_ucs_tfm_body { + my ($face, $dir, $lang)=@_; + + { + $id = '-'; + $filename="utf$lang$face$id-$dir"; + open(TEXTFM,">tfm/$filename.tfm") || die "Can't make \'tfm/$filename.tfm\'!\n"; + binmode(TEXTFM); + if ($dir eq 'h') { + if ($lang eq 'j') { + @tex_tfm = @tex_tfm_ucs_h; + } else { + @tex_tfm = @tex_tfm_h; + } + foreach $binary(@tex_tfm ) {$_ = pack("C", $binary);print TEXTFM "$_";} + }elsif ($dir eq 'v'){ + foreach $binary(@tex_tfm_v) {$_ = pack("C", $binary);print TEXTFM "$_";} + } + close(TEXTFM); + } +} + +sub make_dvipstfm_body { + my ($face, $dir, $lang)=@_; +=comment + ## mktfm.pl does similar procedure. + $varfilename="otf-u$lang$face-$dir"; + open(DVIPSTFM,">tfm/$varfilename.tfm") || die "Can't make \'tfm/$varfilename.tfm\'!\n"; + if ($i==0) { + foreach $binary(@dvips_tfm_h) {$_ = pack("C", $binary);print DVIPSTFM "$_";} + }elsif ($i==1){ + foreach $binary(@dvips_tfm_v) {$_ = pack("C", $binary);print DVIPSTFM "$_";} + } + close(DVIPSTFM); +=cut + $varfilename= "otf-u$lang$face-$dir"; + open(DVIPSTFM,">tfm/$varfilename.tfm") || die "Can't make \'tfm/$varfilename.tfm\'!\n"; + binmode(DVIPSTFM); + if ($dir eq 'h') { + if ($lang eq 'j') { + @dvips_tfm = @dvips_tfm_ucs_h; + } else { + @dvips_tfm = @dvips_tfm_h; + } + foreach $binary(@dvips_tfm ) {$_ = pack("C", $binary);print DVIPSTFM "$_";} + }elsif ($dir eq 'v'){ + foreach $binary(@dvips_tfm_v) {$_ = pack("C", $binary);print DVIPSTFM "$_";} + } + close(DVIPSTFM); +} diff --git a/Master/texmf-dist/source/fonts/japanese-otf-uptex/script/mkutfvf_sp.pl b/Master/texmf-dist/source/fonts/japanese-otf-uptex/script/mkutfvf_sp.pl index 8392b7b686e..97ea89f2af1 100755 --- a/Master/texmf-dist/source/fonts/japanese-otf-uptex/script/mkutfvf_sp.pl +++ b/Master/texmf-dist/source/fonts/japanese-otf-uptex/script/mkutfvf_sp.pl @@ -43,7 +43,15 @@ my %font_id = qw/1b g 1d h 1e i 1f j &makeunivf; sub makejvf { - foreach $lang ($lang[0]){ #language + foreach $lang ($lang[0]){ #language, japanase + foreach $newjis ('', 'n') { + foreach $face (@face){ #face + $face0 = $face.$newjis; + foreach $dir (@dir){ #direction + &make_ucs_vf_body($face0, $dir, $lang); + } + } + } foreach $face (@face){ #face foreach $dir (@dir){ #direction &makevf_body($face, $dir, $lang); @@ -52,7 +60,12 @@ sub makejvf { } } sub makemlvf { - foreach $lang (@lang[1..$multi]){ #language + foreach $lang (@lang[1..$multi]){ #language, t c k + foreach $face (@face){ #face + foreach $dir (@dir){ #direction + &make_ucs_vf_body($face, $dir, $lang); + } + } foreach $face (@face[0..1]){ #face foreach $dir (@dir){ #direction &makevf_body($face, $dir, $lang); @@ -75,8 +88,8 @@ sub makevf_body { foreach $first_hex (0x1b, 0x1d .. 0x2f) { # U+1Cxxx : not defined yet next if (!$exist_head[$first_hex]); - $HEX = sprintf("%X", $first_hex); - $id = $font_id{sprintf("%x", $first_hex)}; + $HEX = sprintf("%02X", $first_hex); + $id = $font_id{sprintf("%02x", $first_hex)}; warn "now processing (face:$face, dir:$dir, lang:$lang, first_hex:$HEX, ID:$id) ...\n"; $filename="utf$lang$face$id-$dir"; open(OUT, ">ovp/$filename.ovp")||die "$!"; @@ -100,8 +113,8 @@ sub make_uni_vf_body { foreach $first_hex (0x1b, 0x1d .. 0x2f) { # U+1Cxxx : not defined yet next if (!$exist_head[$first_hex]); - $HEX = sprintf("%X", $first_hex); - $id = $font_id{sprintf("%x", $first_hex)}; + $HEX = sprintf("%02X", $first_hex); + $id = $font_id{sprintf("%02x", $first_hex)}; warn "now processing (face:$face, dir:$dir, lang:MULTI, first_hex:$HEX, ID:$id) ...\n"; $filename="utf$face$id-$dir"; open(OUT, ">ovp/$filename.ovp")||die "$!"; @@ -120,6 +133,26 @@ sub make_uni_vf_body { } } +sub make_ucs_vf_body { + my ($face, $dir, $lang)=@_; + + { + $id = '-'; + warn "now processing (face:$face, dir:$dir, lang:$lang, ucs vf, ID:$id) ...\n"; + $filename="utf$lang$face$id-$dir"; + open(OUT, ">ovp/$filename.ovp")||die "$!"; + &fonthead; + print OUT "(MAPFONT D 0\n (FONTNAME otf-u$lang$face-$dir)\n"; + &fontfoot; + &writechar_ucs($dir) if ($lang eq 'j'); + close(OUT); + unless ($debug){ + system("$ovp2ovf ovp/$filename.ovp vf/$filename.vf vf/$filename.ofm"); + unlink "vf/$filename.ofm"; + } + } +} + sub fonthead { print OUT <<END_OF_DATA; (VTITLE JVF for UTF16) @@ -164,3 +197,13 @@ sub writechar { } } } + +sub writechar_ucs { + my ($dir) = @_; + my $wd = $dir eq 'h' ? '0.5' : '1.0'; + foreach $uni (0xFF61 .. 0xFF9F){ + my $uniX = sprintf("%X", $uni); + print OUT "(CHARACTER H $uniX (CHARWD R $wd) (MAP \n"; + print OUT " (SETCHAR H $uniX)))\n"; + } +} diff --git a/Master/texmf-dist/source/fonts/japanese-otf-uptex/script/umkpkana.pl b/Master/texmf-dist/source/fonts/japanese-otf-uptex/script/umkpkana.pl index 4c14fd45593..26208884540 100755 --- a/Master/texmf-dist/source/fonts/japanese-otf-uptex/script/umkpkana.pl +++ b/Master/texmf-dist/source/fonts/japanese-otf-uptex/script/umkpkana.pl @@ -265,6 +265,7 @@ sub write_char { } } sub print_char{ + return if ($omitfw); printf OVP "(CHARACTER H %X\n", $dvicode; printf OVP " (CHARWD R %f)\n", $font_at; print OVP " (MAP\n"; diff --git a/Master/texmf-dist/source/fonts/japanese-otf-uptex/script/umkvpkana.pl b/Master/texmf-dist/source/fonts/japanese-otf-uptex/script/umkvpkana.pl index f1ff477518b..da4d0d7d8a8 100755 --- a/Master/texmf-dist/source/fonts/japanese-otf-uptex/script/umkvpkana.pl +++ b/Master/texmf-dist/source/fonts/japanese-otf-uptex/script/umkvpkana.pl @@ -240,6 +240,7 @@ sub write_char { } } sub print_char{ + return if ($omitfw); printf OVP "(CHARACTER H %X\n", $dvicode; printf OVP " (CHARWD R %f)\n", $font_at; print OVP " (MAP\n"; diff --git a/Master/texmf-dist/source/fonts/japanese-otf-uptex/umakeotf b/Master/texmf-dist/source/fonts/japanese-otf-uptex/umakeotf index 5acab5eb181..bcdd544a704 100755 --- a/Master/texmf-dist/source/fonts/japanese-otf-uptex/umakeotf +++ b/Master/texmf-dist/source/fonts/japanese-otf-uptex/umakeotf @@ -48,18 +48,18 @@ done echo "making alt. kana ..." for face in minr gothr minb gothb mgothr do -./umkjvf -ucs -sp 1 -cq -expert upexp${face}-h uph${face}-h cidj${face} -./umkjvf -ucs -sp 1 -cm -cp -expert upexp${face}-v uph${face}-v cidj${face} -./umkjvf -ucs -sp 1 -cq -ruby upruby${face}-h uph${face}-h cidj${face} -./umkjvf -ucs -sp 1 -cm -cp -ruby upruby${face}-v uph${face}-v cidj${face} +./umkjvf -ucs -sp 1 -omitfw -cq -expert upexp${face}-h uph${face}-h cidj${face} +./umkjvf -ucs -sp 1 -omitfw -cm -cp -expert upexp${face}-v uph${face}-v cidj${face} +./umkjvf -ucs -sp 1 -omitfw -cq -ruby upruby${face}-h uph${face}-h cidj${face} +./umkjvf -ucs -sp 1 -omitfw -cm -cp -ruby upruby${face}-v uph${face}-v cidj${face} done #extra fonts for face in gotheb minl do -./umkjvf -ucs -sp 1 -cq -expert upexp${face}-h uph${face}-h cidj${face} -./umkjvf -ucs -sp 1 -cm -cp -expert upexp${face}-v uph${face}-v cidj${face} -./umkjvf -ucs -sp 1 -cq -ruby upruby${face}-h uph${face}-h cidj${face} -./umkjvf -ucs -sp 1 -cm -cp -ruby upruby${face}-v uph${face}-v cidj${face} +./umkjvf -ucs -sp 1 -omitfw -cq -expert upexp${face}-h uph${face}-h cidj${face} +./umkjvf -ucs -sp 1 -omitfw -cm -cp -expert upexp${face}-v uph${face}-v cidj${face} +./umkjvf -ucs -sp 1 -omitfw -cq -ruby upruby${face}-h uph${face}-h cidj${face} +./umkjvf -ucs -sp 1 -omitfw -cm -cp -ruby upruby${face}-v uph${face}-v cidj${face} done diff --git a/Master/texmf-dist/source/fonts/japanese-otf-uptex/umakeotf_brsg b/Master/texmf-dist/source/fonts/japanese-otf-uptex/umakeotf_brsg index f2c878285cc..2296dc79293 100755 --- a/Master/texmf-dist/source/fonts/japanese-otf-uptex/umakeotf_brsg +++ b/Master/texmf-dist/source/fonts/japanese-otf-uptex/umakeotf_brsg @@ -35,25 +35,25 @@ done echo "making vf for burasage ..." for face in minr gothr minb gothb mgothr do -./umkjvf -ucs -sp 1 -sage -cq upbrsgnml${face}-h uph${face}-h -./umkjvf -ucs -sp 1 -sage -cm -cp upbrsgnml${face}-v uph${face}-v +./umkjvf -ucs -sp 1 -sage -omitfw -cq upbrsgnml${face}-h uph${face}-h +./umkjvf -ucs -sp 1 -sage -omitfw -cm -cp upbrsgnml${face}-v uph${face}-v done #extra fonts for face in gotheb minl do -./umkjvf -ucs -sp 1 -sage -cq upbrsgnml${face}-h uph${face}-h -./umkjvf -ucs -sp 1 -sage -cm -cp upbrsgnml${face}-v uph${face}-v +./umkjvf -ucs -sp 1 -sage -omitfw -cq upbrsgnml${face}-h uph${face}-h +./umkjvf -ucs -sp 1 -sage -omitfw -cm -cp upbrsgnml${face}-v uph${face}-v done for face in minr gothr minb gothb mgothr do -./umkjvf -ucs -sp 1 -sage -cq -expert upbrsgexp${face}-h uph${face}-h cidj${face} -./umkjvf -ucs -sp 1 -sage -cm -cp -expert upbrsgexp${face}-v uph${face}-v cidj${face} +./umkjvf -ucs -sp 1 -sage -omitfw -cq -expert upbrsgexp${face}-h uph${face}-h cidj${face} +./umkjvf -ucs -sp 1 -sage -omitfw -cm -cp -expert upbrsgexp${face}-v uph${face}-v cidj${face} done #extra fonts for face in gotheb minl do -./umkjvf -ucs -sp 1 -sage -cq -expert upbrsgexp${face}-h uph${face}-h cidj${face} -./umkjvf -ucs -sp 1 -sage -cm -cp -expert upbrsgexp${face}-v uph${face}-v cidj${face} +./umkjvf -ucs -sp 1 -sage -omitfw -cq -expert upbrsgexp${face}-h uph${face}-h cidj${face} +./umkjvf -ucs -sp 1 -sage -omitfw -cm -cp -expert upbrsgexp${face}-v uph${face}-v cidj${face} done diff --git a/Master/texmf-dist/source/fonts/japanese-otf-uptex/umakeotf_jis04 b/Master/texmf-dist/source/fonts/japanese-otf-uptex/umakeotf_jis04 index 6001bf2c622..f02e69fd63c 100755 --- a/Master/texmf-dist/source/fonts/japanese-otf-uptex/umakeotf_jis04 +++ b/Master/texmf-dist/source/fonts/japanese-otf-uptex/umakeotf_jis04 @@ -67,40 +67,40 @@ done for face in minr gothr minb gothb mgothr do -./umkjvf -ucs -sp 1 -cq -expert upexp${face}n-h uph${face}n-h cidj${face} -./umkjvf -ucs -sp 1 -cm -cp -expert upexp${face}n-v uph${face}n-v cidj${face} +./umkjvf -ucs -sp 1 -omitfw -cq -expert upexp${face}n-h uph${face}n-h cidj${face} +./umkjvf -ucs -sp 1 -omitfw -cm -cp -expert upexp${face}n-v uph${face}n-v cidj${face} done #extra fonts for face in gotheb minl do -./umkjvf -ucs -sp 1 -cq -expert upexp${face}n-h uph${face}n-h cidj${face} -./umkjvf -ucs -sp 1 -cm -cp -expert upexp${face}n-v uph${face}n-v cidj${face} +./umkjvf -ucs -sp 1 -omitfw -cq -expert upexp${face}n-h uph${face}n-h cidj${face} +./umkjvf -ucs -sp 1 -omitfw -cm -cp -expert upexp${face}n-v uph${face}n-v cidj${face} done echo "making vf for burasage & jis2004 ..." for face in minr gothr minb gothb mgothr do -./umkjvf -ucs -sp 1 -sage -cq upbrsgnml${face}n-h uph${face}n-h -./umkjvf -ucs -sp 1 -sage -cm -cp upbrsgnml${face}n-v uph${face}n-v +./umkjvf -ucs -sp 1 -sage -omitfw -cq upbrsgnml${face}n-h uph${face}n-h +./umkjvf -ucs -sp 1 -sage -omitfw -cm -cp upbrsgnml${face}n-v uph${face}n-v done #extra fonts for face in gotheb minl do -./umkjvf -ucs -sp 1 -sage -cq upbrsgnml${face}n-h uph${face}n-h -./umkjvf -ucs -sp 1 -sage -cm -cp upbrsgnml${face}n-v uph${face}n-v +./umkjvf -ucs -sp 1 -sage -omitfw -cq upbrsgnml${face}n-h uph${face}n-h +./umkjvf -ucs -sp 1 -sage -omitfw -cm -cp upbrsgnml${face}n-v uph${face}n-v done for face in minr gothr minb gothb mgothr do -./umkjvf -ucs -sp 1 -sage -cq -expert upbrsgexp${face}n-h uph${face}n-h cidj${face} -./umkjvf -ucs -sp 1 -sage -cm -cp -expert upbrsgexp${face}n-v uph${face}n-v cidj${face} +./umkjvf -ucs -sp 1 -sage -omitfw -cq -expert upbrsgexp${face}n-h uph${face}n-h cidj${face} +./umkjvf -ucs -sp 1 -sage -omitfw -cm -cp -expert upbrsgexp${face}n-v uph${face}n-v cidj${face} done #extra fonts for face in gotheb minl do -./umkjvf -ucs -sp 1 -sage -cq -expert upbrsgexp${face}n-h uph${face}n-h cidj${face} -./umkjvf -ucs -sp 1 -sage -cm -cp -expert upbrsgexp${face}n-v uph${face}n-v cidj${face} +./umkjvf -ucs -sp 1 -sage -omitfw -cq -expert upbrsgexp${face}n-h uph${face}n-h cidj${face} +./umkjvf -ucs -sp 1 -sage -omitfw -cm -cp -expert upbrsgexp${face}n-v uph${face}n-v cidj${face} done diff --git a/Master/texmf-dist/source/fonts/japanese-otf-uptex/umakeotf_prop b/Master/texmf-dist/source/fonts/japanese-otf-uptex/umakeotf_prop index 378429ed44b..13b27d5152b 100755 --- a/Master/texmf-dist/source/fonts/japanese-otf-uptex/umakeotf_prop +++ b/Master/texmf-dist/source/fonts/japanese-otf-uptex/umakeotf_prop @@ -18,8 +18,8 @@ mkdir ovp fi echo "making proportional kana tfm/vf ..." -perl -s script/umkpkana.pl -sp=1 -hk -perl -s script/umkvpkana.pl -sp=1 +perl -s script/umkpkana.pl -omitfw -hk +perl -s script/umkvpkana.pl -omitfw for face in minw3 minw6 kakuw3 kakuw6 maruw4 do diff --git a/Master/texmf-dist/source/fonts/japanese-otf-uptex/umkjvf b/Master/texmf-dist/source/fonts/japanese-otf-uptex/umkjvf index 39973e09990..f90f4a5a0aa 100755 --- a/Master/texmf-dist/source/fonts/japanese-otf-uptex/umkjvf +++ b/Master/texmf-dist/source/fonts/japanese-otf-uptex/umkjvf @@ -41,13 +41,9 @@ sub initialize_constant{ @yoko_tfm_binary=(0x00, 0x0B, 0x00, 0x01, 0x00, 0x1B, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x14, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xEB, 0x85, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); @tate_tfm_binary=(0x00, 0x09, 0x00, 0x01, 0x00, 0x1B, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); @yoko_ucs_tfm_binary=map{ hex($_) } qw/ - 00 0b 00 40 00 6c 00 12 00 00 00 01 00 03 00 02 + 00 0b 00 40 00 5c 00 02 00 00 00 01 00 03 00 02 00 02 00 01 00 00 00 00 00 00 00 09 00 00 00 00 - 00 a0 00 00 0b 55 4e 53 50 45 43 49 46 49 45 44 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 0b 55 4e 53 - 50 45 43 49 46 49 45 44 00 00 00 00 00 00 00 00 - 80 00 00 00 00 00 00 00 ff 61 00 01 ff 62 00 01 + 00 a0 00 00 00 00 00 00 ff 61 00 01 ff 62 00 01 ff 63 00 01 ff 64 00 01 ff 65 00 01 ff 66 00 01 ff 67 00 01 ff 68 00 01 ff 69 00 01 ff 6a 00 01 ff 6b 00 01 ff 6c 00 01 ff 6d 00 01 ff 6e 00 01 @@ -98,41 +94,44 @@ JIS UCS } sub proc_arg { if ($#ARGV == -1) {&print_help;} - GetOptions(\@ARGV, ['^-b', \$baseline_shift, 1], ['^-m', \$minute_option, 0], ['^-cm', \$cid_minute, 0], ['^-cq', \$cid_quote, 0], ['^-cp', \$comma_period, 0], ['^-chk', \$cid_hankana, 0], ['^-SJIS', \$sjis, 0], ['^-scale', \$scale, 1], ['^-notfm', \$without_tfm, 1], ['^-expert', \$expert, 0], ['^-ruby', \$ruby, 0], ['^-sage', \$burasage, 0], ['^-jp04', \$jis2004, 0], ['^-ucs', \$ucs, 0], ['^-sp', \$sp, 1], ['^-ovp2ovf', \$ovp2ovf_command, 1], ['^-h(e|el|elp)?', \$help, 0], ['^-dbg', \$debug_mode, 0], ['^-(.+)', \$unknown, 0]); + GetOptions(\@ARGV, ['^-b', \$baseline_shift, 1], ['^-m', \$minute_option, 0], ['^-cm', \$cid_minute, 0], ['^-cq', \$cid_quote, 0], ['^-cp', \$comma_period, 0], ['^-chk', \$cid_hankana, 0], ['^-SJIS', \$sjis, 0], ['^-scale', \$scale, 1], ['^-notfm', \$without_tfm, 1], ['^-expert', \$expert, 0], ['^-ruby', \$ruby, 0], ['^-sage', \$burasage, 0], ['^-jp04', \$jis2004, 0], ['^-ucs', \$ucs, 0], ['^-omitfw', \$omitfw, 0], ['^-sp', \$sp, 1], ['^-ovp2ovf', \$ovp2ovf_command, 1], ['^-h(e|el|elp)?', \$help, 0], ['^-dbg', \$debug_mode, 0], ['^-(.+)', \$unknown, 0]); if ($unknown == 1){ - print "mkjvf: Unknown options!\n"; + print "umkjvf: Unknown options!\n"; &print_help; } if ($help == 1){&print_help;} if (($expert == 0) && ($ruby == 0)){ if ($#ARGV <= 0) { - print "mkjvf: Need two to three file arguments.\n"; + print "umkjvf: Need two to three file arguments.\n"; &print_help; } } elsif (($expert != 0) && ($ruby != 0)){ - print "mkjvf: You can't use \"-ruby\" and \"-expert\" at same time.\n"; + print "umkjvf: You can't use \"-ruby\" and \"-expert\" at same time.\n"; &print_help; } elsif (($scale != 0) && ($ruby != 0)){ - print "mkjvf: You can't use \"-ruby\" and \"-scale\" at same time.\n"; + print "umkjvf: You can't use \"-ruby\" and \"-scale\" at same time.\n"; &print_help; } elsif (($jis2004 != 0) && ($ruby != 0)){ - print "mkjvf: You can't use \"-ruby\" and \"-jp04\" at same time.\n"; + print "umkjvf: You can't use \"-ruby\" and \"-jp04\" at same time.\n"; &print_help; } elsif (($jis2004 != 0) && ($sjis != 0)){ - print "mkjvf: You can't use \"-sjis\" and \"-jp04\" at same time.\n"; + print "umkjvf: You can't use \"-sjis\" and \"-jp04\" at same time.\n"; &print_help; } elsif (($jis2004 != 0) && ($ucs != 0)){ - print "mkjvf: You can't use \"-ucs\" and \"-jp04\" at same time.\n"; + print "umkjvf: You can't use \"-ucs\" and \"-jp04\" at same time.\n"; + &print_help; + } elsif (($omitfw != 0) && ($baseline_shift != 0)){ + print "umkjvf: You can't use \"-b\" and \"-omitfw\" at same time.\n"; &print_help; } else { if ($#ARGV <= 1) { - print "mkjvf: Need three file arguments for this option.\n"; + print "umkjvf: Need three file arguments for this option.\n"; &print_help; } $alt_kana_true=1; } if ($scale < 0 || $scale >= 1){ - print "mkjvf: Invalid Scale!!\n"; + print "umkjvf: Invalid Scale!!\n"; &print_help; } if ($scale == 0){$scale = 1;} @@ -458,6 +457,7 @@ sub print_help { print " -burasage make the width of kutoh-ten zero for burasage\n"; print " -jp04 make a font mapped JIS X 0213:2004 glyphs\n"; print " -ucs make ucs mapped vf (umkjvf extention)\n"; + print " -omitfw omit entries in vf for characters with default metric (umkjvf extention)\n"; print " -sp <0--2> include supplemental plane (umkjvf extention)\n"; print " -SJIS make shift jis mapped vf (experimental)\n"; print " -scale <0--1> make kokana vf\n"; @@ -712,26 +712,35 @@ sub print_kigo_char{ print OVP " )\n"; } sub print_char{ - printf OVP "(CHARACTER H %X\n", $dvicode; - printf OVP " (CHARWD R %f)\n", $font_at; - print OVP " (MAP\n"; + $fontmap = 0; if (($jis2004 == 1) && (0x3029 <= $jiscode && $jiscode <= 0x726D)){ if (exists $kaisei_jikei{$jiscode}){ $cid = $kaisei_jikei{$jiscode}; - $fontmap = int($cid/4096)+3; - printf OVP " (SELECTFONT D %d)\n", $fontmap; + $fontmap = int($cid/4096)+3; ## $fontmap>=3 $upper = int(($cid%4096)/64)+16; $lower = (($cid%4096)%64)+16; # printf STDOUT "%d, %d\n",$upper,$lower; $char_code = $upper*256+$lower+0x2020; } } + if ($omitfw && $baseline_shift==0 && !$fontmap) { + return if ($dvicode==$char_code); + } + printf OVP "(CHARACTER H %X\n", $dvicode; + printf OVP " (CHARWD R %f)\n", $font_at; + print OVP " (MAP\n"; + if ($fontmap) { + printf OVP " (SELECTFONT D %d)\n", $fontmap; + } &baseline_shift; printf OVP " (SETCHAR H %X)\n",$char_code; print OVP " )\n"; print OVP " )\n"; } sub print_kana_char{ + if ($omitfw && $baseline_shift==0 && $scale==1 && $kana_font eq "") { + return if ($dvicode==$char_code); + } printf OVP "(CHARACTER H %X\n", $dvicode; printf OVP " (CHARWD R %f)\n", $font_at; print OVP " (MAP\n"; |