summaryrefslogtreecommitdiff
path: root/fonts/utilities/makefonts/make_mflogo
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /fonts/utilities/makefonts/make_mflogo
Initial commit
Diffstat (limited to 'fonts/utilities/makefonts/make_mflogo')
-rwxr-xr-xfonts/utilities/makefonts/make_mflogo148
1 files changed, 148 insertions, 0 deletions
diff --git a/fonts/utilities/makefonts/make_mflogo b/fonts/utilities/makefonts/make_mflogo
new file mode 100755
index 0000000000..9384fe171a
--- /dev/null
+++ b/fonts/utilities/makefonts/make_mflogo
@@ -0,0 +1,148 @@
+#!/bin/sh
+
+# Generate pk fonts for:
+# logo with package mflogo
+# Volker Kuhlmann <v.kuhlmann@elec.canterbury.ac.nz>
+# 7 Nov 1999
+
+test -f /bin/sh5 && test -z "$RUNNING_SH5" \
+ && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \
+ && { RUNNING_SH5=true; export RUNNING_SH5; exec /bin/sh5 $0 ${1+"$@"}; }
+unset RUNNING_SH5
+
+test -f /bin/bsh && test -z "$RUNNING_BSH" \
+ && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \
+ && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; }
+unset RUNNING_BSH
+
+case "$1" in
+ -r)
+ DVIPS=dvired
+ shift
+ ;;
+ *)
+ DVIPS=dvips
+ ;;
+esac
+
+progname=`basename $0`
+
+case "$progname" in
+ allec)
+ encoding=T1;;
+ *)
+ encoding=OT1;;
+esac
+
+case "$1" in
+ -ec|-t1)
+ encoding=T1
+ shift
+ ;;
+ *)
+ true; # encoding=OT1
+ ;;
+esac
+
+body()
+{
+ cat <<-'eof'
+ \pagestyle{empty}
+ \parindent0in
+ \hfuzz=\maxdimen
+ \hbadness=10000
+ \textheight9.5in
+ \textwidth6.5in
+
+ \newcommand{\myformula}{\sum a_{b_{c_d}} = c\ }
+ \newcommand{\mytext}{text\ }
+ \newcommand{\mymath}{$\mathcal{\myformula}\mathrm{\myformula}
+ \mathbf{\myformula}\mathsf{\myformula}\mathtt{\myformula}
+ \mathnormal{\myformula}\mathit{\myformula}$}
+ \newcommand{\mytextmath}{\mytext\mymath}
+
+ \newcommand{\TestSizesSmaller}{{%
+ \tiny\mytextmath \scriptsize\mytextmath
+ \footnotesize\mytextmath \small\mytextmath}}
+ \newcommand{\TestSizesLarger}{{%
+ \normalsize\mytextmath
+ \large\mytextmath \Large\mytextmath \LARGE\mytextmath
+ \huge\mytextmath \Huge\mytextmath}}
+ \newcommand{\TestSizes}{\TestSizesSmaller\TestSizesLarger}
+
+ \newcommand{\TextSmaller}{{%
+ \tiny\mytext \scriptsize\mytext
+ \footnotesize\mytext \small\mytext}}
+ \newcommand{\TextLarger}{{%
+ \normalsize\mytext
+ \large\mytext \Large\mytext \LARGE\mytext
+ \huge\mytext \Huge\mytext}}
+ \newcommand{\TextSizes}{\TextSmaller\TextLarger}
+
+ \newcommand{\TestRM}{rm-family: {\rmfamily\TestSizes}\newline}
+ \newcommand{\TestSF}{sf-family: {\sffamily\TestSizes}\newline}
+ \newcommand{\TestTT}{tt-family: {\ttfamily\TestSizes}\newline}
+ \newcommand{\TestFamilies}{\par\TestRM\TestSF\TestTT\par}
+
+ \newcommand{\TestMD}{md-series: {\mdseries\TestFamilies}}
+ \newcommand{\TestBF}{bf-series: {\bfseries\TestFamilies}}
+ \newcommand{\TestSeries}{\TestBF\TestMD\par}
+
+ \newcommand{\TestUP}{up-shape: {\upshape\TestSeries}\par}
+ \newcommand{\TestIT}{it-shape: {\itshape\TestSeries}\par}
+ \newcommand{\TestSL}{sl-shape: {\slshape\TestSeries}\par}
+ \newcommand{\TestSC}{sc-shape: {\scshape\TestSeries}\par}
+ \newcommand{\TestShapes}{\TestUP\TestIT\TestSL\TestSC\par}
+
+ \newcommand{\TextShapes}{\let\TestSizes=\TextSizes \TestShapes}
+
+ \usepackage{mflogo}
+
+ \begin{document}
+ \let\mytext=\MF
+ \TestShapes
+ \end{document}
+eof
+}
+
+head()
+{
+ echo '\documentclass['$1'pt]{article}'
+ echo '\usepackage['$2']{fontenc}'
+}
+
+cd /tmp
+mkdir tmp$$ && cd tmp$$ || exit
+trap "cd / ; rm -rf /tmp/tmp$$; trap '' 0; exit 0" 0 1 2 15
+
+cat <<-'EOF' >&2
+
+---------------------------------------------------------------------
+>>>>>>>>>>> Generating testfiles for 10pt, 11pt and 12pt. <<<<<<<<<<
+---------------------------------------------------------------------
+EOF
+head 10 $encoding > allcm10.tex
+head 11 $encoding > allcm11.tex
+head 12 $encoding > allcm12.tex
+body >> allcm10.tex
+body >> allcm11.tex
+body >> allcm12.tex
+
+echo >&2
+echo "---------------------------------------------------------------------" >&2
+echo ">>>>>>>>>>> Calling latex... <<<<<<<<<<" >&2
+echo "---------------------------------------------------------------------" >&2
+latex allcm10 >/dev/null
+latex allcm11 >/dev/null
+latex allcm12 >/dev/null
+
+echo >&2
+echo "---------------------------------------------------------------------" >&2
+echo ">>>>>>>>>>> Now, calling $DVIPS to make missing fonts... <<<<<<<<<<" >&2
+echo "---------------------------------------------------------------------" >&2
+$DVIPS ${1+"$@"} -f allcm10 > /dev/null
+$DVIPS ${1+"$@"} -f allcm11 > /dev/null
+$DVIPS ${1+"$@"} -f allcm12 > /dev/null
+
+cd /
+rm -rf /tmp/tmp$$