\setupoutput[pdftex] \setupcolors[state=start] \startuseMPgraphic{FunnyFrame} picture p ; numeric o ; path a,b ; pair c ; p:= textext.rt(\MPstring{FunnyFrame}) ; o:= BodyFontSize ; a:= unitsquare xyscaled(OverlayWidth,OverlayHeight) ; p:= p shifted(2o,OverlayHeight-ypart center p) ; drawoptions(withpen pencircle scaled 1pt withcolor .625red) ; b:= a superellipsed .95 ; fill b withcolor .85white ; draw b ; b:= (boundingbox p) superellipsed .95 ; fill b withcolor .85white ; draw b ; draw p withcolor black ; setbounds currentpicture to a ; \stopuseMPgraphic \defineoverlay[FunnyFrame] [\useMPgraphic{FunnyFrame}] \defineframedtext[FunnyText] [frame=off, background=FunnyFrame] \def\StartFrame{\startFunnyText} \def\StopFrame{\stopFunnyText} \def\FrameTitle#1% {\setMPtext{FunnyFrame}{\hbox spread1em{\hss\strut#1\hss}}} \setMPtext{FunnyFrame}{}%initializethetextvariable \starttext \FrameTitle{Test} \StartFrame \input zapf\relax \StopFrame \stoptext