use strict;
use vars qw($opt_in_cs $opt_order $opt_kage $opt_replace
+ $opt_latin
$opt_use_kage_for_Ext_B $opt_allow_unification
$opt_help $usage
$in_cs $out_cs $i @chars
"order=s"=>\$opt_order,
"replace",\$opt_replace,
"kage",\$opt_kage,
+ "latin",\$opt_latin,
"unify",\$opt_allow_unification,
"help",\$opt_help);
$usage=<<EOF;
-Usage: $0 [-i <input coding system>] [-o <order of kanji>] [-kru] <filename>
+Usage: $0 [-i <input coding system>] [-o <order of kanji>] [-klru] <filename>
-i: input coding system: (default: ucs\@mcs)
ucs\@mcs, ucs\@cns, ucs\@gb, ucs\@jis, ucs\@ks
-o: order of kanji: (default: j)
k: KS
G: GT
m: Multi, use \\UTFM of otf.sty
- You can also combine them, ex. jtcgkm
+ You can also combine them, ex. jGcgkm
-k: use Kage server.
+ -l: preserve latin characters also in ucs\@jis environment.
-r: replace r and l with dot below to those with circle below.
-u: allow unification.
EOF
# or GETA character if ids is invalid for KAGE.
my($ids)=@_;
# return $geta if(not $exec_makefonts);
- $ids=&normalize_ids($ids,"UniJIS");
+# $ids=&normalize_ids($ids,"UniJIS");
return $geta if(($ids!~/[$idc]/)
or($ids=~/[\x{10000}-]/));
#irregular for KAGE.
- if(not defined($ids{$ids}) and $ids{$ids}[1]>=0){
+ if(not defined($ids{$ids})){
$ids{$ids}[0]=$font_start;
$ids{$ids}[1]=$ids_start;
$ids_start++;
# return: char in ucs@mcs.
my($char,$in_cs)=@_;
my($output_char);
+ my $char_id=unpack("U",$char);
- if(($output_char)=&get_chars_matching("=$in_cs",unpack("U",$char))){
+ if($opt_latin and $texmacro[$char_id]){
+ return $char;
+ }
+ if(($output_char)=&get_chars_matching("=$in_cs",$char_id)){
return $output_char;
}else{
return $char;