summaryrefslogtreecommitdiff
path: root/tex/context/base/core-fnt.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/core-fnt.mkiv')
-rw-r--r--tex/context/base/core-fnt.mkiv22
1 files changed, 13 insertions, 9 deletions
diff --git a/tex/context/base/core-fnt.mkiv b/tex/context/base/core-fnt.mkiv
index 76ce03f72..09ebcc15f 100644
--- a/tex/context/base/core-fnt.mkiv
+++ b/tex/context/base/core-fnt.mkiv
@@ -173,10 +173,15 @@
%D fuzzy, since some \type {\fontdimen}'s are involved to
%D determine the optimal placement.
+\def\highvfraction {0}
+\def\lowvfraction {0}
+\def\highlowvfraction{.1}
+\def\highlowhfraction{.1}
+
\def\dodohighlow
{\ifx\fontsize\empty
\ifmmode
- \ifnum\fam<0 \tx \else \holamathfont \fi
+ \mr
\else
\tx
\fi
@@ -187,17 +192,16 @@
\def\dohighlow#1#2#3#4#5#6% todo, named fontdimens tag
{\dontleavehmode
\bgroup
- \scratchdimen\ifdim\fontexheight\textfont2=1ex #2\textfont2\else #3ex\fi
- \advance\scratchdimen #4ex
- \kern.1ex
+ \scratchdimen\dimexpr#3ex+#4ex\relax
+ \kern\highlowhfraction ex
\setbox\scratchbox\hbox{#1\scratchdimen\hbox{\dodohighlow\dostarttagged#5\empty#6\dostoptagged}}%
\ht\scratchbox\strutheight
\dp\scratchbox\strutdepth
\box\scratchbox
\egroup}
-\unexpanded\def\high{\dohighlow\raise\mathsupnormal{.86}{0}\t!sup}
-\unexpanded\def\low {\dohighlow\lower\mathsubnormal{.48}{0}\t!sub}
+\unexpanded\def\high{\dohighlow\raise\mathsupnormal{.86}\highvfraction\t!sup}
+\unexpanded\def\low {\dohighlow\lower\mathsubnormal{.48}\lowvfraction \t!sub}
\unexpanded\def\lohi
{\dosingleempty\dolohi}
@@ -208,9 +212,9 @@
\def\dolohi[#1]#2#3%
{\dontleavehmode
\hbox
- {\dostarttagged\t!subsup
- \setbox4\hbox{\dohighlow\lower\mathsubnormal{.48}{.1}\t!sub{#2}}%
- \setbox6\hbox{\dohighlow\raise\mathsupnormal{.86}{.1}\t!sup{#3}}%
+ {\dostarttagged\t!subsup\empty
+ \setbox4\hbox{\dohighlow\lower\mathsubnormal{.48}\highlowvfraction\t!sub{#2}}%
+ \setbox6\hbox{\dohighlow\raise\mathsupnormal{.86}\highlowvfraction\t!sup{#3}}%
\doif{#1}{\v!left}
{\ifdim\wd4<\wd6
\setbox4\hbox to \wd6{\hss\box4}%