summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/meta-pdf.mkii
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/meta-pdf.mkii')
-rw-r--r--Master/texmf-dist/tex/context/base/meta-pdf.mkii49
1 files changed, 40 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/context/base/meta-pdf.mkii b/Master/texmf-dist/tex/context/base/meta-pdf.mkii
index 3060de539d6..51e01d8ed06 100644
--- a/Master/texmf-dist/tex/context/base/meta-pdf.mkii
+++ b/Master/texmf-dist/tex/context/base/meta-pdf.mkii
@@ -639,8 +639,15 @@
%D finally I saw the light. It proved that we also had to
%D take care of \type{(split arguments)}.
+% \startMPcode
+% draw btex Ga toch effe f\kern0ptietsen?{}` etex ;
+% \stopMPcode
+
+\newtoks \everyMPshowfont
+
\def\setMPfshowfont#1#2%
- {\font\temp=#1\space at #2\relax\temp}
+ {\font\temp=#1\space at #2\relax\temp
+ \the\everyMPshowfont}
\let\MPfshowcommand\empty
@@ -648,7 +655,7 @@
{\setbox\scratchbox\hbox
{\obeyMPspecials
\edef\MPtextsize{\gMPa\nofMParguments}%
- \def\do(##1){##1}%
+ \def\do(##1){##1}% only works in latest mp
\edef\MPtextdata{\dogMPa1}% beware, stack can have more
\handleMPtext}%
\setbox\scratchbox\hbox
@@ -665,13 +672,36 @@
{\ifnum\nofMParguments>\plusthree
\handleMPtextnormal
\else
- \convertcommand\MPtextdata\to\MPtextdata
+ \defconvertedcommand\MPtextdata\MPtextdata
\expanded{\splitstring\MPtextdata}\at::::\to\MPtexttag\and\MPtextnumber
\executeifdefined{handleMPtext\MPtexttag}\handleMPtextnormal
\fi}
% elsewhere we will implement \handleMPtextmptxt
+\def\doflushMPtext#1%
+ {\edef\!!stringa{#1}%
+ \@EA\dodoflushMPtext\!!stringa\relax}
+
+\def\dodoflushMPtext
+ {\afterassignment\dododoflushMPtext\let\nexttoken=}
+
+\def\dododoflushMPtext
+ {\ifx\nexttoken\relax
+ % done
+ \else\ifx\nexttoken\char
+ \@EA\@EA\@EA\dodododoflushMPtext
+ \else
+ {\nexttoken}%
+ \@EA\@EA\@EA\dodoflushMPtext
+ \fi\fi}
+
+\def\dodododoflushMPtext
+ {\afterassignment\dododododoflushMPtext\scratchcounter}
+
+\def\dododododoflushMPtext
+ {{\char\scratchcounter}\let\next\dodoflushMPtext}
+
\def\handleMPtextnormal
{\let\ \relax % mp breaks long lines and appends a \
\ifx\MPtextsize\PSnfont % round font size (to pt)
@@ -694,8 +724,8 @@
\MPfshowcommand
{\ifnum\nofMParguments=\plusone
\def\do(##1){##1}%
- \dogMPa1%
- \else
+ \doflushMPtext{\dogMPa1}%
+ \else % can't happen anymore in mp version 1+
% we need to catch ( a ) (a a a) (\123 \123 \123) etc
\scratchcounter\plusone
\def\dodo##1% Andreas Fieger's bug: (\304...)
@@ -860,9 +890,9 @@
\resetMPmoveto
\PDFcode{\!MPgMPs1 \!MPgMPs2 \!MPgMPs3 \!MPgMPs4 \!MPgMPs5 \!MPgMPs6 c}%
\or
- \ifx\lastMPmoveX\empty \else % bugged
+ \ifx\lastMPmoveX\empty \else % we assume 0,0 rlineto
\flushMPmoveto
- \PDFcode{\!MP\lastMPmoveX\space \!MP\lastMPmoveY\space l S}%
+ \PDFcode{\!MP\lastMPmoveX\space \!MP\lastMPmoveY\space l}%
\resetMPmoveto
\fi
\or
@@ -891,12 +921,13 @@
\PDFcode{\!MP\a\space\!MP\b\space
\!MP\c\space\!MP\d\space
\!MP\e\space\!MP\f\space c}%
- \or
+ \or % rather mp specific ... rline always has 0,0
\bgroup
\noMPtranslate
\flushMPconcatmoveto
+ % next should be \lastMPmoveX+\a,\lastMPmoveY+\b but we know it's 0,0
+ \PDFcode{\!MP\lastMPmoveX\space\!MP\lastMPmoveY\space l S}%
\resetMPmoveto
- \PDFcode{\!MP\a\space\!MP\b\space l S}%
\egroup
\or
% \flushMPconcatmoveto