From 1ba05da4daafb0a18a4a48475586b88ca04c922e Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 19 Jun 2012 00:30:05 +0000 Subject: updmap-setup-kanji bug fixes and changes to operation (-sys version not called anymore) git-svn-id: svn://tug.org/texlive/trunk@26896 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/extra/jfontmaps/ChangeLog | 9 +++++++++ .../extra/jfontmaps/script/updmap-setup-kanji.pl | 21 ++++++++++++--------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/Build/source/extra/jfontmaps/ChangeLog b/Build/source/extra/jfontmaps/ChangeLog index a3e1e2d0143..a4262995b38 100644 --- a/Build/source/extra/jfontmaps/ChangeLog +++ b/Build/source/extra/jfontmaps/ChangeLog @@ -1,3 +1,12 @@ +2012-06-19 Norbert Preining + + * scripts/updmap-setup-kanji.pl: + - fix and simplify status detection + - add options to the help string + - switch completely to updmap (non -sys) variant, we will + use the usual wrapper system for updmap-setup-kanji-sys + (patch from Hironori Kitagawa) + 2012-04-25 Norbert Preining * kozuka/otf-up-kozuka.map: fix inconsistency in naming of diff --git a/Build/source/extra/jfontmaps/script/updmap-setup-kanji.pl b/Build/source/extra/jfontmaps/script/updmap-setup-kanji.pl index 2dd2d71bfdb..09280284554 100755 --- a/Build/source/extra/jfontmaps/script/updmap-setup-kanji.pl +++ b/Build/source/extra/jfontmaps/script/updmap-setup-kanji.pl @@ -19,10 +19,10 @@ use Getopt::Long qw(:config no_autoabbrev ignore_case_always); use strict; my $prg = "updmap-setup-kanji"; -my $vers = "0.9.5"; +my $vers = "0.9.6dev"; my $version = '$Id$'; -my $updmap_real = "updmap-sys"; +my $updmap_real = "updmap"; my $updmap = $updmap_real; my $dry_run = 0; @@ -44,7 +44,7 @@ my $nul = (win32() ? 'nul' : '/dev/null') ; if ($dry_run) { - $updmap = "echo updmap-sys"; + $updmap = "echo updmap"; } if ($opt_help) { @@ -91,7 +91,7 @@ sub Usage { Please see the documentation of updmap for details (updmap --help). - Usage: $prg {|auto|nofont|status} + Usage: $prg [OPTION] {|auto|nofont|status} embed an arbitrary font family , at least the map file otf-.map has to be available. @@ -106,6 +106,12 @@ sub Usage { automatically. status: get information about current environment and usable font map + Options: + -n, --dry-run do not actually run updmap + -h, --help show this message and exit + -jis2004 use JIS2004 variants for default fonts of (u)pTeX + --version show version information and exit + EOF ; print $usage; @@ -145,13 +151,10 @@ sub check_mapfile { sub GetStatus { my $val = `$updmap_real --quiet --showoption kanjiEmbed`; my $STATUS; - if ($val =~ m/^kanjiEmbed=(.*)( \()?/) { + if ($val =~ m/^kanjiEmbed=([^()\s]*)(\s+\()?/) { $STATUS = $1; - $STATUS =~ s/\s*$//; - $STATUS =~ s/\(.*\)$//; - $STATUS =~ s/^"(.*)"$/\1/; } else { - printf STDERR "Cannot find status of current kanjiEmbed setting via updmap-sys --showoption!\n"; + printf STDERR "Cannot find status of current kanjiEmbed setting via updmap --showoption!\n"; exit 1; } -- cgit v1.2.3