Hello,
the following example does not work if the text in the
\FrameTitle{Blockflötenspielen} contains special characters like öäßé etc.
Has someone a solution for this problem?
Thanks a lot,
Helmut
***********************************************************
\mainlanguage[de]
\language[de]
\enableregime[windows]
\setuppapersize[a4][a4]
\setupoutput[pdftex]
\pdfcompresslevel=0
\runMPgraphicstrue
\setupcolors[state=start]
\startuseMPgraphic{FunnyFrame}
picture p; numeric w, h, o;
p:=textext.rt(\MPstring{FunnyFrame});
w:=OverlayWidth; h:=OverlayHeight; o:=BodyFontSize;
p:=p shifted (2o,h-ypart center p); draw p;
drawoptions (withpen pencircle scaled 1pt withcolor .625blue);
draw (2o,h)--(0,h)--(0,0)--(w,0)--(w,h)--(xpart urcorner p, h) ;
draw boundingbox p;
setbounds currentpicture to unitsquare xyscaled (w,h);
\stopuseMPgraphic
\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext[FunnyText][frame=off,background=FunnyFrame]
\def\StartFrame{\startFunnyText}
\def\StopFrame{\stopFunnyText}
\def\FrameTitle#1%
{\setMPtext{FunnyFrame}{\hbox spread 2em {\hss\strut#1\hss}}}
\setMPtext{FunnyFrame}{}
\starttext
\FrameTitle{Blockflötenspielen}
\StartFrame
These: Blockflötenspielen macht Spaß!
\StopFrame
\stoptext