diff options
author | Hans Hagen <pragma@wxs.nl> | 2012-01-05 19:27:49 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2012-01-05 19:27:49 +0100 |
commit | 8d0f99447733416abc3331598edd923fb68226f4 (patch) | |
tree | 99a2d7c26b02a1ae5fe96df5a3aa558515b7b088 /tex/context/base/mlib-pps.mkiv | |
parent | 26a44eb06bb8cc85c90f016beaa0d0f504ab024c (diff) | |
download | context-8d0f99447733416abc3331598edd923fb68226f4.tar.gz |
beta 2011.12.20 22:24
Diffstat (limited to 'tex/context/base/mlib-pps.mkiv')
-rw-r--r-- | tex/context/base/mlib-pps.mkiv | 42 |
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 |