summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2012-01-27 02:37:43 +0000
committerNorbert Preining <preining@logic.at>2012-01-27 02:37:43 +0000
commit6333a2ffcab12dd4eeb5840c57435e386379cc83 (patch)
tree5a1e4b9b357f03d222628bf95493948954c7fb29
parentc8884a046a82066d41e45dd285afc0e4d562c1ab (diff)
support ipaex and ipa fonts, and improve and extended documentation
git-svn-id: svn://tug.org/texlive/trunk@25213 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/extra/jfontmaps/script/updmap-otf116
1 files changed, 96 insertions, 20 deletions
diff --git a/Build/source/extra/jfontmaps/script/updmap-otf b/Build/source/extra/jfontmaps/script/updmap-otf
index 3ae10ff5180..4527aaa2e77 100644
--- a/Build/source/extra/jfontmaps/script/updmap-otf
+++ b/Build/source/extra/jfontmaps/script/updmap-otf
@@ -1,5 +1,9 @@
#!/bin/sh
# updmap-otf: v0.9.1
+#
+# 27 Jan 2012 by PREINING Norbert <preining@logic.at> v0.9.2
+# support IPA and IPAex fonts
+# improve and extended documentation
# 11 Nov 2011 by PREINING Norbert <preining@logic.at> v0.9.1
# use kpsewhich for finding fonts
# use updmap-sys --setoption kanjiEmbed to select the font family
@@ -30,26 +34,38 @@
Usage() {
cat <<EOF
- Usage: updmap-otf {hiragino|morisawa|kozuka|nofont|"installed font name"|auto|status}
+ updmap-otf Front end to updmap.cfg configuration for Japanese fonts
+ as used in the otf package.
- hiragino: set Hiragino Fonts embedded in pdf files by otf package
- morisawa: set Morisawa Fonts embedded in pdf files by otf package
- kozuka: set kozuka Fonts embedded in pdf files by otf package
+ This script searches for some of the most common fonts
+ for embedding into pdfs by dvipdfmx.
+
+ Usage: updmap-otf {<fontname>|auto|nofont|status}
+
+ <fontname> set fonts as defined by the map file otf-<fontname>.map
+ if it exists.
+ auto: sets one of the following supported font families
+ automatically:
+ hiragino, morisawa, kozuka, ipaex, ipa
nofont: set no fonts are embedded
- If your system does not have above 3 font families,
- this target is selected automatically.
- "installed font name":
- set fonts which are installed as
- TEXMF/fonts/map/dvipdfm/otf-"install font name".map
- auto: set fonts automatically
+ If your system does not have any of the supported font
+ families as specified above, this target is selected
+ automatically.
+ auto: set fonts automatically depending on current settings and
+ available fonts
status: get information about current environment and usable font map
EOF
}
+#
+# representatives of support font families
+#
hiragino_font=HiraMinPro-W3.otf
morisawa_font=A-OTF-RyuminPro-Light.otf
kozuka_font=KozMinPro-Regular.otf
+ipa_font=ipam.ttf
+ipaex_font=ipaexm.ttf
###
@@ -74,6 +90,20 @@ CheckInstallFont() {
else
KOZUKA=""
fi
+
+ if kpsewhich $ipa_font >/dev/null ; then
+ IPA=installed
+ else
+ IPA=""
+ fi
+
+ if kpsewhich $ipaex_font >/dev/null ; then
+ IPAEX=installed
+ else
+ IPAEX=""
+ fi
+
+
}
###
@@ -91,7 +121,7 @@ else
fi
-for MAPFILE in otf-hiragino.map otf-morisawa.map otf-kozuka.map
+for MAPFILE in otf-hiragino.map otf-morisawa.map otf-kozuka.map otf-ipaex.map otf-ipa.map
do
if [ "$MAPFILE" = "otf-$STATUS.map" ] ; then
continue
@@ -114,6 +144,16 @@ do
echo "Standby map file : $MAPFILE"
fi
;;
+ otf-ipa.map)
+ if [ "$IPA" = "installed" ]; then
+ echo "Standby map file : $MAPFILE"
+ fi
+ ;;
+ otf-ipaex.map)
+ if [ "$IPAEX" = "installed" ]; then
+ echo "Standby map file : $MAPFILE"
+ fi
+ ;;
*)
echo "Should not happen!"
;;
@@ -147,7 +187,7 @@ fi
main() {
-mktexlsr 2> /dev/null
+# mktexlsr 2> /dev/null
CheckInstallFont
@@ -178,25 +218,61 @@ case "$1" in
main auto
fi
;;
+ ipa)
+ if [ "$IPA" = "installed" ]; then
+ SetupMapFile ipa
+ else
+ main auto
+ fi
+ ;;
+ ipaex)
+ if [ "$IPAEX" = "installed" ]; then
+ SetupMapFile ipaex
+ else
+ main auto
+ fi
+ ;;
nofont)
SetupMapFile noEmbed
;;
auto)
GetStatus
+ # first check if we have a status set and the font is installed
+ # in this case don't change anything, just make sure
if [ "$STATUS" = "morisawa" ] && [ "$MORISAWA" = "installed" ]; then
SetupMapFile morisawa
elif [ "$STATUS" = "kozuka" ] && [ "$KOZUKA" = "installed" ]; then
SetupMapFile kozuka
- elif [ "$STATUS" = "noEmbed" ] && [ "$HIRAGINO" = "installed" ]; then
- SetupMapFile hiragino
- elif [ "$HIRAGINO" = "installed" ]; then
+ elif [ "$STATUS" = "hiragino" ] && [ "$HIRAGINO" = "installed" ]; then
SetupMapFile hiragino
- elif [ "$MORISAWA" = "installed" ]; then
- SetupMapFile morisawa
- elif [ "$KOZUKA" = "installed" ]; then
- SetupMapFile kozuka
+ elif [ "$STATUS" = "ipaex" ] && [ "$IPAEX" = "installed" ]; then
+ SetupMapFile ipaex
+ elif [ "$STATUS" = "ipa" ] && [ "$IPA" = "installed" ]; then
+ SetupMapFile ipa
else
- SetupMapFile noEmbed
+ if [ "$STATUS" = "noEmbed" ] || [ "$STATUS" = "" ]; then
+ : do nothing here, we dont have to warn
+ else
+ # some unknown setting is set up currently, overwrite
+ # but warn
+ echo "Previous setting $STATUS is unknown, replacing it!"
+ fi
+ # if we are in the noEmbed or nothing set case, but one
+ # of the three fonts hiragino/morisawa/kozuka are present
+ # then use them
+ if [ "$HIRAGINO" = "installed" ]; then
+ SetupMapFile hiragino
+ elif [ "$MORISAWA" = "installed" ]; then
+ SetupMapFile morisawa
+ elif [ "$KOZUKA" = "installed" ]; then
+ SetupMapFile kozuka
+ elif [ "$IPAEX" = "installed" ]; then
+ SetupMapFile ipaex
+ elif [ "$IPA" = "installed" ]; then
+ SetupMapFile ipa
+ else
+ SetupMapFile noEmbed
+ fi
fi
;;
status)