summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHironobu Yamashita <h.y.acetaminophen@gmail.com>2019-03-18 11:35:23 +0000
committerHironobu Yamashita <h.y.acetaminophen@gmail.com>2019-03-18 11:35:23 +0000
commit6a97edb10b2e69e2174991b860f7a9394f901f44 (patch)
tree94adbdc01eb7d0351b818edcbe72600bc5b6e120
parentc89fc3fdf2fe346837e0cb92060d90aa18e4c731 (diff)
updmap.pl: support %!DVIPSFB syntax for dvips-specific Kanji map fallbacks
git-svn-id: svn://tug.org/texlive/trunk@50442 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/updmap.pl28
1 files changed, 21 insertions, 7 deletions
diff --git a/Master/texmf-dist/scripts/texlive/updmap.pl b/Master/texmf-dist/scripts/texlive/updmap.pl
index b19a5a49dd1..aa23c959cde 100755
--- a/Master/texmf-dist/scripts/texlive/updmap.pl
+++ b/Master/texmf-dist/scripts/texlive/updmap.pl
@@ -845,9 +845,18 @@ sub cidx2dvips {
chomp;
# save the line for warnings
my $l = $_;
- # first check whether a PSname is given
+ #
my $psname;
+ my $fbname;
#
+ # special case for pre-defined fallback from unicode encoded font
+ if ($_ =~ m/%!DVIPSFB\s\s*([0-9A-Za-z-_!,][0-9A-Za-z-_!,]*)/) {
+ $fbname = $1;
+ # minimal adjustment
+ $fbname =~ s/^!//;
+ $fbname =~ s/,Bold//;
+ }
+ # first check whether a PSname is given
# the matching on \w* is greedy, so will take all the word chars available
# that means we do not need to test for end of word
if ($_ =~ m/%!PS\s\s*([0-9A-Za-z-_][0-9A-Za-z-_]*)/) {
@@ -875,7 +884,8 @@ sub cidx2dvips {
# make everything single spaced
s/\s\s*/ /g;
# unicode encoded fonts are not supported
- next if (m!^[\w-][\w-]* unicode !);
+ # but if a fallback font is pre-defined, we can use it
+ next if (!defined($fbname) && (m!^[0-9A-Za-z-_][0-9A-Za-z-_]* unicode !));
# now we have the following format
# <word> <word> <word> some options like -e or -s
if ($_ !~ m/([^ ][^ ]*) ([^ ][^ ]*) ([^ ][^ ]*)( (.*))?$/) {
@@ -911,13 +921,17 @@ sub cidx2dvips {
$opts .= " \"$italicmax SlantFont\"";
}
# print out the result
- if (defined($psname)) {
- push @d, "$tfmname $psname-$cid$opts\n";
+ if (defined($fbname)) {
+ push @d, "$tfmname $fbname\n";
} else {
- if (defined($fname_psname{$fname})) {
- push @d, "$tfmname $fname_psname{$fname}-$cid$opts\n";
+ if (defined($psname)) {
+ push @d, "$tfmname $psname-$cid$opts\n";
} else {
- push @d, "$tfmname $fname-$cid$opts\n";
+ if (defined($fname_psname{$fname})) {
+ push @d, "$tfmname $fname_psname{$fname}-$cid$opts\n";
+ } else {
+ push @d, "$tfmname $fname-$cid$opts\n";
+ }
}
}
}