From a232fab77596af31c26e3cb455b4c2a82f9d37ff Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 22 Sep 2010 00:15:14 +0000 Subject: installfont (22sep10) git-svn-id: svn://tug.org/texlive/trunk@19837 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/support/installfont/README | 32 ++-- .../texmf-dist/doc/support/installfont/installfont | 88 ++++++++--- .../doc/support/installfont/installfont.pdf | Bin 0 -> 62397 bytes .../doc/support/installfont/installfont.tex | 163 +++++++++++++-------- 4 files changed, 189 insertions(+), 94 deletions(-) create mode 100644 Master/texmf-dist/doc/support/installfont/installfont.pdf (limited to 'Master/texmf-dist/doc') diff --git a/Master/texmf-dist/doc/support/installfont/README b/Master/texmf-dist/doc/support/installfont/README index fc415ab14ed..129677736be 100644 --- a/Master/texmf-dist/doc/support/installfont/README +++ b/Master/texmf-dist/doc/support/installfont/README @@ -10,22 +10,24 @@ have a working font installation in your local TeX tree. License: LPPL -New in v1.5: +New in v1.6: -- added new switches: +- added new switch: - * -m, --mapfilename file name of the map file - * -O. --origfontname use original font names - instead of Karl Berry names + -L, --log redirect terminal output of programms to + LOG file -- added support for more font series. The script now - installs: +- added support for small caps font in all supported + font series. The script now installs: - * light, light italic - * regular/medium, regular/medium italic - * small caps (regular + bold) - * semi bold, semi bold italic - * demi, demi italic - * bold, bold italic - * extra bold, extra bold italic - * ultra bold/heavy, ultra bold/heavy italic \ No newline at end of file + * light, light italic, light small caps + * regular/medium, regular/medium italic, + regular/medium small caps + * semi bold, semi bold italic, semi bold small caps + * demi, demi italic, demi small caps + * bold, bold italic, bold small caps + * extra bold, extra bold italic, extra bold small caps + * ultra bold/heavy, ultra bold/heavy italic, + ultra bold/heavy small caps + + feature requests by: Kurt Lidwin \ No newline at end of file diff --git a/Master/texmf-dist/doc/support/installfont/installfont b/Master/texmf-dist/doc/support/installfont/installfont index aa40e367ffc..6242c5d136c 100644 --- a/Master/texmf-dist/doc/support/installfont/installfont +++ b/Master/texmf-dist/doc/support/installfont/installfont @@ -4,14 +4,14 @@ # # installs a LaTeX font family (Postscript Type1, Truetype, Opentype) # (font series from light to ultra bold + (faked) small caps + faked -# slanted, but no expert fonts) for using with LaTeX (MiKTeX) +# slanted, but no expert fonts) for using them with LaTeX (MiKTeX) # The script tries to rename the fonts automatically (optional). # Otherwise the *.afm and *.pfb files must be named in Karl Berry scheme # (e.g. 5bbr8a.pfb) -# (tested with MiKTeX 2.8) v1.5 (14.09.2010) +# (tested with MiKTeX 2.8) v1.6 (18.09.2010) # (C) Josef Kleber 2009-2010 License: LPPL # -VERSION="v1.5 (2010/09/14)" +VERSION="v1.6 (2010/09/18)" # FONTFAMILY="5bb" FONTNAME="Softmaker Barbedor" @@ -37,7 +37,7 @@ ADMIN="" OTFFONTFEATURES="-fkern -fliga" UNINSTALL="false" INSTALLAS="rmdefault" -SMFFSTY="%" +LOG="false" # function printHelp() { @@ -70,6 +70,8 @@ function printHelp() " -T, --ttdefault installs font family as typewriter font family\n\n"\ " -a, --admin set administrative mode (MiKTeX v2.8+)\n\n"\ " -V, --version will print the version number of `basename $0`\n\n"\ + " -L, --log will write the terminal output of the main programms into the\n"\ + " LOG file instead of the screen\n\n"\ " -h, --help will print this help statement\n\n"\ " See http://latex.josef-kleber.de/index.htm or\n"\ " http://latex.josef-kleber.de/en_index.htm\n"\ @@ -93,8 +95,8 @@ then fi fi # -LONGOPTS="fontfamily:,fontname:,fontcommand:,fontscaleprefix:,fonttype:,packagename:,packagedate:,packageversion:,mapfilename:,origfilename,localtexmf:,fontsubdir:,fontencoding:,otffontfeatures:,uninstall,rmdefault,sfdefault,ttdefault,version,help,admin" -SHORTOPTS="f:n:c:P:t:p:d:v:m:Ol:s:e:o:uRSTVha" +LONGOPTS="fontfamily:,fontname:,fontcommand:,fontscaleprefix:,fonttype:,packagename:,packagedate:,packageversion:,mapfilename:,origfilename,localtexmf:,fontsubdir:,fontencoding:,otffontfeatures:,uninstall,rmdefault,sfdefault,ttdefault,log,version,help,admin" +SHORTOPTS="f:n:c:P:t:p:d:v:m:Ol:s:e:o:uRSTVLha" ARGS=$(getopt -l "$LONGOPTS" "$SHORTOPTS" "$@") if [ $? -ne 0 ] then @@ -114,6 +116,7 @@ while [ $# -gt 0 ]; do --sfdefault|-S) shift; INSTALLAS="sfdefault";; --ttdefault|-T) shift; INSTALLAS="ttdefault";; --uninstall|-u) shift; UNINSTALL="true";; + --log|-L) shift; LOG="true";; --fontfamily|-f) shift; FONTFAMILY="$1"; shift;; --fontname|-n) shift; FONTNAME="$1"; shift;; --fontcommand|-c) shift; FONTCOMMAND="$1"; shift;; @@ -133,6 +136,8 @@ while [ $# -gt 0 ]; do esac done # +rm LOG 2>>/dev/null; +# if [ -z $MAPFILENAME ] then MAPFILENAME=$FONTFAMILY @@ -247,12 +252,41 @@ then FILES=$(grep -e "Smc" -e "Caps" -e "SCOsF" *.afm | cut -d':' -f1 | uniq) for file in $FILES do - FWEIGHT=$(grep -e "Weight" "$file" | cut -d' ' -f2 | sed -e "s/\r//") - if [ $FWEIGHT = "Bold" -o $FWEIGHT = "Xbold" -o $FWEIGHT = "XBold" ] + FONTCUT="rc" + FWEIGHT=$(grep -e "Light" "$file" | wc -l) + if [ $FWEIGHT -gt 0 ] then - FONTCUT="bc" + FONTCUT="lc" else - FONTCUT="rc" + FWEIGHT=$(grep -e "Semibold" -e "SemiBold" "$file" | wc -l) + if [ $FWEIGHT -gt 0 ] + then + FONTCUT="sc" + else + FWEIGHT=$(grep -e "Demi" -e "Demibold" -e "DemiBold" "$file" | wc -l) + if [ $FWEIGHT -gt 0 ] + then + FONTCUT="dc" + else + FWEIGHT=$(grep -e "Extrabold" -e "ExtraBold" "$file" | wc -l) + if [ $FWEIGHT -gt 0 ] + then + FONTCUT="xc" + else + FWEIGHT=$(grep -e "Heavy" -e "Ultrabold" -e "UltraBold" "$file" | wc -l) + if [ $FWEIGHT -gt 0 ] + then + FONTCUT="uc" + else + FWEIGHT=$(grep -e "Bold" -e "bold" "$file" | wc -l) + if [ $FWEIGHT -gt 0 ] + then + FONTCUT="bc" + fi + fi + fi + fi + fi fi mv "$file" ./Rename/${FONTFAMILY}${FONTCUT}${FONTENCODING}.afm; mv "${file%afm}pfb" ./Rename/${FONTFAMILY}${FONTCUT}${FONTENCODING}.pfb; @@ -269,7 +303,6 @@ then else FONTCUT="l" fi - SMFFSTY="\RequirePackage{softmakerfreefont}%" mv "$file" ./Rename/${FONTFAMILY}${FONTCUT}${FONTENCODING}.afm; mv "${file%afm}pfb" ./Rename/${FONTFAMILY}${FONTCUT}${FONTENCODING}.pfb; echo -e "s/<${FONTFAMILY}${FONTCUT}${FONTENCODING}/<${file%.afm}/" >>map.sed; @@ -285,7 +318,6 @@ then else FONTCUT="s" fi - SMFFSTY="\RequirePackage{softmakerfreefont}%" mv "$file" ./Rename/${FONTFAMILY}${FONTCUT}${FONTENCODING}.afm; mv "${file%afm}pfb" ./Rename/${FONTFAMILY}${FONTCUT}${FONTENCODING}.pfb; echo -e "s/<${FONTFAMILY}${FONTCUT}${FONTENCODING}/<${file%.afm}/" >>map.sed; @@ -301,7 +333,6 @@ then else FONTCUT="d" fi - SMFFSTY="\RequirePackage{softmakerfreefont}%" mv "$file" ./Rename/${FONTFAMILY}${FONTCUT}${FONTENCODING}.afm; mv "${file%afm}pfb" ./Rename/${FONTFAMILY}${FONTCUT}${FONTENCODING}.pfb; echo -e "s/<${FONTFAMILY}${FONTCUT}${FONTENCODING}/<${file%.afm}/" >>map.sed; @@ -317,7 +348,6 @@ then else FONTCUT="x" fi - SMFFSTY="\RequirePackage{softmakerfreefont}%" mv "$file" ./Rename/${FONTFAMILY}${FONTCUT}${FONTENCODING}.afm; mv "${file%afm}pfb" ./Rename/${FONTFAMILY}${FONTCUT}${FONTENCODING}.pfb; echo -e "s/<${FONTFAMILY}${FONTCUT}${FONTENCODING}/<${file%.afm}/" >>map.sed; @@ -333,7 +363,6 @@ then else FONTCUT="u" fi - SMFFSTY="\RequirePackage{softmakerfreefont}%" mv "$file" ./Rename/${FONTFAMILY}${FONTCUT}${FONTENCODING}.afm; mv "${file%afm}pfb" ./Rename/${FONTFAMILY}${FONTCUT}${FONTENCODING}.pfb; echo -e "s/<${FONTFAMILY}${FONTCUT}${FONTENCODING}/<${file%.afm}/" >>map.sed; @@ -395,17 +424,32 @@ cat >${FONTFAMILY}-drv.tex <>LOG 2>&1 +else + tex ${FONTFAMILY}-drv.tex +fi # ((STEP++)) echo -e "\n\n$STEP) Compiling metrics and virtual fonts\n\n" for file in *.pl; do - pltotf $file ${file%pl}tfm; + if [ $LOG = "true" ] + then + pltotf $file ${file%pl}tfm >>LOG 2>&1 + else + pltotf $file ${file%pl}tfm + fi done for file in *.vpl; do - vptovf $file ${file%vpl}vf ${file%vpl}tfm; + if [ $LOG = "true" ] + then + vptovf $file ${file%vpl}vf ${file%vpl}tfm >>LOG 2>&1 + else + vptovf $file ${file%vpl}vf ${file%vpl}tfm + fi done # ((STEP++)) @@ -418,7 +462,12 @@ cat >${FONTFAMILY}-map.tex <>LOG 2>&1 +else + tex ${FONTFAMILY}-map.tex +fi if [ $OFN = "true" ] then sed -f map.sed ${FONTFAMILY}.map >${MAPFILENAME}.map @@ -434,7 +483,6 @@ echo -e "\n\n$STEP) Creating the style file" cat >${PACKAGENAME}.sty <