summaryrefslogtreecommitdiff
path: root/tex/context/base/mlib-pps.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mlib-pps.mkiv')
-rw-r--r--tex/context/base/mlib-pps.mkiv42
1 files changed, 30 insertions, 12 deletions
diff --git a/tex/context/base/mlib-pps.mkiv b/tex/context/base/mlib-pps.mkiv
index 0dbdd3f6e..f4d5483d3 100644
--- a/tex/context/base/mlib-pps.mkiv
+++ b/tex/context/base/mlib-pps.mkiv
@@ -30,6 +30,19 @@
% have no limitation. Typically an example of a next version solution
% due to \LUATEX\ evolving.
+% TODO: foigure out why this is shifted
+%
+% \setupbodyfont[palatino]
+%
+% \starttext
+% \startMPpage
+% draw textext("123") ;
+% \stopMPpage
+% \stoptext
+%
+% A slightly larger picturew works ok. Some kind of interference
+% with the OTR.
+
\newbox \MPtextbox
\newtoks\everyMPLIBsettext
@@ -49,18 +62,23 @@
\def\MPLIBgettextscaledcm#1#2#3#4#5#6#7#8#9% 2-7: sx,rx,ry,sy,tx,ty
{\ctxlua{metapost.gettext(\number\MPtextbox,#1)}%
- \setbox\scratchbox\hbox
- {\dotransformnextbox{#2}{#3}{#4}{#5}{#6}{#7}% does push pop
- \vbox to \zeropoint
- {\vss
- \hbox to \zeropoint
- {\scale[\c!sx=#8,\c!sy=#9]{\raise\dp\MPtextbox\box\MPtextbox}%
- \forcecolorhack
- \hss}}}%
- \smashbox\scratchbox
- \box\scratchbox}
-
-\def\MPLIBgraphictext#1%
+ \setbox\MPbox\hbox\bgroup
+ \dotransformnextbox{#2}{#3}{#4}{#5}{#6}{#7}% does push pop
+ \vbox to \zeropoint\bgroup
+ \vss
+ \hbox to \zeropoint \bgroup
+ % \scale[\c!sx=#8,\c!sy=#9]{\raise\dp\MPtextbox\box\MPtextbox}\forcecolorhack
+ \dostartscaling{#8}{#9}%
+ \raise\dp\MPtextbox\box\MPtextbox
+ \dostopscaling
+ \hss
+ \egroup
+ \egroup
+ \egroup
+ \smashbox\MPbox
+ \box\MPbox}
+
+\def\MPLIBgraphictext#1% use at mp end
{\startTEXpage[\c!scale=10000]#1\stopTEXpage}
%D \startbuffer