diff options
author | Takuji Tanaka <KXD02663@nifty.ne.jp> | 2014-08-09 01:32:45 +0000 |
---|---|---|
committer | Takuji Tanaka <KXD02663@nifty.ne.jp> | 2014-08-09 01:32:45 +0000 |
commit | c576300c15a26509a2018e5af14365e13b795b5b (patch) | |
tree | 3b10628bff1a45378b3a3d206d9aaa4bcdf98cc4 /Master/texmf-dist/source/fonts/japanese-otf-uptex/umkjvf | |
parent | e407c7b3fe62fc6dc28bb82280025b0c502aa64b (diff) |
japanese-otf-uptex 0.16
git-svn-id: svn://tug.org/texlive/trunk@34881 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/fonts/japanese-otf-uptex/umkjvf')
-rwxr-xr-x | Master/texmf-dist/source/fonts/japanese-otf-uptex/umkjvf | 251 |
1 files changed, 10 insertions, 241 deletions
diff --git a/Master/texmf-dist/source/fonts/japanese-otf-uptex/umkjvf b/Master/texmf-dist/source/fonts/japanese-otf-uptex/umkjvf index a9ed37a2c81..39973e09990 100755 --- a/Master/texmf-dist/source/fonts/japanese-otf-uptex/umkjvf +++ b/Master/texmf-dist/source/fonts/japanese-otf-uptex/umkjvf @@ -2,13 +2,16 @@ ################### ### main part ### ################### +use FindBin; +use lib "$FindBin::Bin/script"; +use CheckDVICode; #initialize &initialize_constant; #processing arguments &proc_arg; if ($sp==1) { # supplemental plane - use script::MakeSPList; - &MakeSPList::make_sp_char_list('j'); + use MakeSPList; + &make_sp_char_list('j'); %exist_char=%{$MakeSPList::r_exist_char->{'j'}}; } #make ovp @@ -135,7 +138,7 @@ sub proc_arg { if ($scale == 0){$scale = 1;} if ($sjis != 0){$max_ku=120;}else{$max_ku=94;} if ($cid_minute != 0){$minute_option = 1;} - if ($ucs){&reorder_odoriji;} + if ($ucs){&reorder_odoriji; $CheckDVICode::is_ucs=$ucs;} $tfm_name = shift(@ARGV); $tfm_name =~ s/\.tfm//; $kanji_font = shift(@ARGV); @@ -323,7 +326,7 @@ sub write_char { for ($ku=1; $ku<=$max_ku; $ku++){ for ($ten=1; $ten<=94; $ten++){ $jiscode=($ku+32)*256+($ten+32); - $dvicode=$jiscode; + $CheckDVICode::dvicode=$dvicode=$jiscode; if($sjis == 1){ &get_shift_jiscode; $char_code=$shift_jiscode; @@ -350,12 +353,12 @@ sub write_char { } else { # ucs $max_ucs= $sp ? 0x2FA1F : 0xFFFF; # U+2FA1F: max of CJK Compatibility Ideographs Supplement for ($ucscode=0; $ucscode<=$max_ucs; $ucscode++){ + $CheckDVICode::dvicode=$dvicode=$ucscode; + $char_code=$ucscode; next unless (&is_ucs_jpn_range); if ($sp==1 && $ucscode>0xFFFF) { next unless ($exist_char{sprintf("%X",$ucscode)}); } - $dvicode=$ucscode; - $char_code=$ucscode; if(&is_ucs_hankana && $direction eq "y"){ &print_hankana_char; next; @@ -440,7 +443,7 @@ sub make_tfm { #### dfn of sub sub rtns ### ############################## sub print_help { - print "This is umkjvf version 0.12 (2013/6/02) by ttk\n"; + print "This is umkjvf version 0.14 (2014/3/22) by ttk\n"; print "Based on mkjvf version 1.0b21 (2010/3/25) by psitau\n"; print "Usage: umkjvf [option] <TFMfile> <PSfontTFM> [<PSfontTFM>]\n"; print " -b <number> baseline shift\n"; @@ -938,240 +941,6 @@ sub scaled_shift{ } } -sub is_dvicode{ - local ($key)=@_; - local ($code)=($dvicode); - - if (!$ucs) { - if ($key eq 'hira-a') { return ($code == 0x2421);} - if ($key eq 'hira-i') { return ($code == 0x2423);} - if ($key eq 'hira-u') { return ($code == 0x2425);} - if ($key eq 'hira-e') { return ($code == 0x2427);} - if ($key eq 'hira-o') { return ($code == 0x2429);} - if ($key eq 'hira-tsu') { return ($code == 0x2443);} - if ($key eq 'hira-ya') { return ($code == 0x2463);} - if ($key eq 'hira-yu') { return ($code == 0x2465);} - if ($key eq 'hira-yo') { return ($code == 0x2467);} - if ($key eq 'hira-wa') { return ($code == 0x246E);} - if ($key eq 'hira-Vu') { return 0; } # large JIS X 0213 - if ($key eq 'hira-ka') { return 0; } # small JIS X 0213 - if ($key eq 'hira-ke') { return 0; } # small JIS X 0213 - if ($key eq 'kata-a') { return ($code == 0x2521);} - if ($key eq 'kata-i') { return ($code == 0x2523);} - if ($key eq 'kata-u') { return ($code == 0x2525);} - if ($key eq 'kata-e') { return ($code == 0x2527);} - if ($key eq 'kata-o') { return ($code == 0x2529);} - if ($key eq 'kata-tsu') { return ($code == 0x2543);} - if ($key eq 'kata-ya') { return ($code == 0x2563);} - if ($key eq 'kata-yu') { return ($code == 0x2565);} - if ($key eq 'kata-yo') { return ($code == 0x2567);} - if ($key eq 'kata-wa') { return ($code == 0x256E);} - if ($key eq 'kata-ka') { return ($code == 0x2575);} - if ($key eq 'kata-ke') { return ($code == 0x2576);} - if ($key eq 'kata-Va') { return 0; } # large JIS X 0213 - if ($key eq 'kata-Vi') { return 0; } # : JIS X 0213 - if ($key eq 'kata-Ve') { return 0; } # : JIS X 0213 - if ($key eq 'kata-Vo') { return 0; } # large JIS X 0213 - if ($key eq 'kata-ku') { return 0; } # small JIS X 0213 - if ($key eq 'kata-mu') { return 0; } # small JIS X 0213 - if ($key eq 'kata-ku..ro') { return 0; } # small JIS X 0213 - if ($key eq 'comma') { return ($code == 0x2124);} - if ($key eq 'period') { return ($code == 0x2125);} - if ($key eq 'odoriji') { return - ((0x2133 <= $code && $code <= 0x2136) || $code == 0x213C);} - if ($key eq 'hira-odoriji') { return - ($code == 0x2135 || $code == 0x2136);} - if ($key eq 'kutouten') { return - ($code>=0x2122 && $code<=0x2128);} - if ($key eq 'burasage') { return - ($code>=0x2122 && $code<=0x2125);} - if ($key eq 'nakaten' ) { return ($code == 0x2126);} - if ($key eq 'colon' ) { return ($code == 0x2127);} - if ($key eq 'semicolon') { return ($code == 0x2128);} - if ($key eq 'quote') { return - ($code >= 0x2146 && $code <= 0x2149);} - if ($key eq 's-quote') { return - ($code == 0x2146 || $code == 0x2147);} - if ($key eq 'd-quote') { return - ($code == 0x2148 || $code == 0x2149);} - if ($key eq 'kakko') { return - (0x214A <= $code && $code <= 0x215B);} - if ($key eq 'open') { return ($code%2==0);} - if ($key eq 'close') { return ($code%2==1);} - - die "illegal keyname ($key)\n"; - } else { # ucs - if ($key eq 'hira-a') { return ($code == 0x3041);} # small - if ($key eq 'hira-i') { return ($code == 0x3043);} # : - if ($key eq 'hira-u') { return ($code == 0x3045);} # : - if ($key eq 'hira-e') { return ($code == 0x3047);} # : - if ($key eq 'hira-o') { return ($code == 0x3049);} # : - if ($key eq 'hira-tsu') { return ($code == 0x3063);} # : - if ($key eq 'hira-ya') { return ($code == 0x3083);} # : - if ($key eq 'hira-yu') { return ($code == 0x3085);} # : - if ($key eq 'hira-yo') { return ($code == 0x3087);} # : - if ($key eq 'hira-wa') { return ($code == 0x308E);} # small - if ($key eq 'hira-Vu') { return ($code == 0x3094);} # large JIS X 0213 - if ($key eq 'hira-ka') { return ($code == 0x3095);} # small JIS X 0213 - if ($key eq 'hira-ke') { return ($code == 0x3096);} # small JIS X 0213 - if ($key eq 'kata-a') { return ($code == 0x30A1);} # small - if ($key eq 'kata-i') { return ($code == 0x30A3);} # : - if ($key eq 'kata-u') { return ($code == 0x30A5);} # : - if ($key eq 'kata-e') { return ($code == 0x30A7);} # : - if ($key eq 'kata-o') { return ($code == 0x30A9);} # : - if ($key eq 'kata-tsu') { return ($code == 0x30C3);} # : - if ($key eq 'kata-ya') { return ($code == 0x30E3);} # : - if ($key eq 'kata-yu') { return ($code == 0x30E5);} # : - if ($key eq 'kata-yo') { return ($code == 0x30E7);} # : - if ($key eq 'kata-wa') { return ($code == 0x30EE);} # : - if ($key eq 'kata-ka') { return ($code == 0x30F5);} # : - if ($key eq 'kata-ke') { return ($code == 0x30F6);} # small - if ($key eq 'kata-Va') { return ($code == 0x30F7);} # large JIS X 0213 - if ($key eq 'kata-Vi') { return ($code == 0x30F8);} # : JIS X 0213 - if ($key eq 'kata-Ve') { return ($code == 0x30F9);} # : JIS X 0213 - if ($key eq 'kata-Vo') { return ($code == 0x30FA);} # large JIS X 0213 - if ($key eq 'kata-ku') { return ($code == 0x31F0);} # small JIS X 0213 - if ($key eq 'kata-mu') { return ($code == 0x31FA);} # small JIS X 0213 - if ($key eq 'kata-ku..ro') { return - ($code >= 0x31F0 && $code <= 0x31FF);} # small JIS X 0213 - if ($key eq 'comma') { return ($code == 0xFF0C);} - if ($key eq 'period') { return ($code == 0xFF0E);} - if ($key eq 'odoriji') { return - ($code == 0x30FD || $code == 0x30FE || - $code == 0x309D || $code == 0x309E || - $code == 0x30FC);} - if ($key eq 'hira-odoriji') { return - ($code == 0x309D || $code == 0x309E);} - if ($key eq 'kutouten') { return - ($code == 0x3001 || $code == 0x3002 || - $code == 0xFF0C || $code == 0xFF0E || - $code == 0x30FB || - $code == 0xFF1A || $code == 0xFF1B);} - if ($key eq 'burasage') { return - ($code == 0x3001 || $code == 0x3002 || - $code == 0xFF0C || $code == 0xFF0E);} - if ($key eq 'nakaten' ) { return ($code == 0x30FB);} - if ($key eq 'colon' ) { return ($code == 0xFF1A);} - if ($key eq 'semicolon') { return ($code == 0xFF1B);} - if ($key eq 'quote') { return - ($code == 0x2018 || $code == 0x2019 || - $code == 0x201C || $code == 0x201D);} - if ($key eq 's-quote') { return - ($code == 0x2018 || $code == 0x2019);} - if ($key eq 'd-quote') { return - ($code == 0x201C || $code == 0x201D);} - if ($key eq 'kakko') { return - ((0x3008 <= $code && $code <= 0x3011) || - $code == 0x3014 || $code == 0x3015 || - $code == 0xFF08 || $code == 0xFF09 || - $code == 0xFF3B || $code == 0xFF3D || - $code == 0xFF5B || $code == 0xFF5D || - $code == 0xFF5F || $code == 0xFF60 || # X0213 1-02-54,55 - $code == 0x3018 || $code == 0x3019 || # X0213 1-02-56,57 - $code == 0x3016 || $code == 0x3017 || # X0213 1-02-58,59 - $code == 0x301D || $code == 0x301F # X0213 1-13-64,65 - );} - if ($key eq 'open') { return &is_ucs_open($code); } - if ($key eq 'close') { return (!&is_ucs_open($code)); } - - die "illegal keyname ($key)\n"; - } -} - -sub is_ucs_open { - if ($code == 0x301D) { return 1;} - if ($code <= 0xFF09) { return ($code%2==0);} - if ($code == 0xFF3B || $code == 0xFF5B) { return 1;} - if ($code == 0xFF5F) { return 1;} - return 0; -} - -sub is_ucs_kigo{ - return 1 if ($ucscode>=0x2018 && $ucscode<=0x2019); - return 1 if ($ucscode>=0x201C && $ucscode<=0x201D); - return 1 if ($ucscode>=0x3001 && $ucscode<=0x301F); - return 1 if ($ucscode>=0x3090 && $ucscode<=0x3093); - return 1 if ($ucscode>=0x3097 && $ucscode<=0x309F); - return 1 if ($ucscode>=0x30FB && $ucscode<=0x30FE); - return 1 if ($ucscode>=0xFF08 && $ucscode<=0xFF60); - - return 0; -} - -sub is_ucs_hira{ - return 1 if ($ucscode>=0x3041 && $ucscode<=0x308F); - return 1 if ($ucscode>=0x3094 && $ucscode<=0x3096); # Vu, small Ka, small Ke - return 0; -} - -sub is_ucs_kata{ - return 1 if ($ucscode>=0x30A1 && $ucscode<=0x30F6); - return 1 if ($ucscode>=0x30F7 && $ucscode<=0x30FA); # Va, Vi, Ve, Vo - return 1 if ($ucscode>=0x31F0 && $ucscode<=0x31FF); # small Ku, small Shi, ... , Small Re, Small Ro - return 0; -} - -sub is_ucs_hankana{ - return 1 if ($ucscode>=0xFF61 && $ucscode<=0xFF9F); - return 0; -} - -sub is_ucs_jpn_range{ - return 1 if ($ucscode<=0x04FF); # Cyrillic - - return 0 if ($ucscode< 0x1E00); - return 1 if ($ucscode<=0x243F); # Control Pictures - - return 0 if ($ucscode< 0x2460); - return 1 if ($ucscode<=0x27BF); # Dingbats - - return 0 if ($ucscode< 0x2900); - return 1 if ($ucscode<=0x29FF); # Miscellaneous Mathematical Symbols-B - - return 0 if ($ucscode< 0x2B00); - return 1 if ($ucscode<=0x2BFF); # Miscellaneous Symbols and Arrows - - return 0 if ($ucscode< 0x2E80); - return 1 if ($ucscode<=0x2FDF); # Kangxi Radicals - - return 0 if ($ucscode< 0x3000); - return 1 if ($ucscode<=0x30FF); # Katakana - - return 0 if ($ucscode< 0x3190); - return 1 if ($ucscode<=0x319F); # Kanbun - - return 0 if ($ucscode< 0x31F0); - return 1 if ($ucscode<=0x4DBF); # CJK Unified Ideographs Extension A - - return 0 if ($ucscode< 0x4E00); - return 1 if ($ucscode<=0x9FFF); # CJK Unified Ideographs - - return 0 if ($ucscode< 0xE000); - return 1 if ($ucscode<=0xFB4F); # Alphabetic Presentation Forms - - return 0 if ($ucscode< 0xFE10); - return 1 if ($ucscode<=0xFE1F); # Vertical Forms - - return 0 if ($ucscode< 0xFE30); - return 1 if ($ucscode<=0xFE4F); # CJK Compatibility Forms - - return 0 if ($ucscode< 0xFF00); - return 1 if ($ucscode<=0xFFEF); # Halfwidth and Fullwidth Forms - - return 0 if ($ucscode< 0x1F100); - return 1 if ($ucscode<=0x1F1FF); # Enclosed Alphanumeric Supplement - return 1 if ($ucscode<=0x1F2FF); # Enclosed Ideographic Supplement - - return 0 if ($ucscode< 0x20000); - return 1 if ($ucscode<=0x2A6DF); # CJK Unified Ideographs Extension B - return 1 if ($ucscode<=0x2B73F); # CJK Unified Ideographs Extension C - return 1 if ($ucscode<=0x2B81F); # CJK Unified Ideographs Extension D - - return 0 if ($ucscode< 0x2F800); - return 1 if ($ucscode<=0x2FA1F); # CJK Compatibility Ideographs Supplement - - return 0; -} __END__ 0xFF5F: JIS X 0213 1-02-54 FULLWIDTH LEFT WHITE PARENTHESIS 始め二重バーレーン |