summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/font-tra.mkiv
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-06-22 00:05:31 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-06-22 00:05:31 +0200
commit5c9b859165af46407543b25589ce8852ee079620 (patch)
tree28998698986312e101e15ca57e55e944200a3d8f /tex/context/base/mkiv/font-tra.mkiv
parentd11a1200ed28c6e0058990a621d7404f821ac7fd (diff)
downloadcontext-5c9b859165af46407543b25589ce8852ee079620.tar.gz
2017-06-21 23:09:00
Diffstat (limited to 'tex/context/base/mkiv/font-tra.mkiv')
-rw-r--r--tex/context/base/mkiv/font-tra.mkiv13
1 files changed, 12 insertions, 1 deletions
diff --git a/tex/context/base/mkiv/font-tra.mkiv b/tex/context/base/mkiv/font-tra.mkiv
index 38b172ba6..a03d30799 100644
--- a/tex/context/base/mkiv/font-tra.mkiv
+++ b/tex/context/base/mkiv/font-tra.mkiv
@@ -124,7 +124,18 @@
\unexpanded\def\otfstepcharcommand#1#2#3% font char class
{\otfstepspace
- \doif{#3}{mark}{\underbar}{U+\hexnumber{#2}}:\ruledhbox{\ctxlua{nodes.tracers.fontchar(#1,#2)}}%
+ \doif{#3}{mark}{\underbar}{U+\hexnumber{#2}}:%
+ \setbox\scratchbox\hbox{\ctxlua{nodes.tracers.fontchar(#1,#2)}}%
+ \ifdim\wd\scratchbox=\zeropoint
+ \scratchwidth.125\onepoint
+ \scratchdistance\dimexpr(\emwidth/2-\scratchwidth)\relax
+ \kern\scratchdistance
+ \ruledhbox to \scratchwidth{\hss\box\scratchbox\hss}%
+ \kern-\scratchwidth
+ \hskip\scratchdistance
+ \else
+ \ruledhbox{\box\scratchbox}%
+ \fi
\otfstepspace}
\unexpanded\def\otfstepfontcommand#1#2#3% id font size