Hi all,
I'm trying the example at page 236 Graphics and macros (metafun-s.pdf).
I use vietnamese utf-8 input with T5.:
--------------------------- code ---------------
\enableregime[utf]
\setupencoding[default=t5]
\loadmapfile[urwvn]
\usetypescript[all][computer-modern][t5]
\setupbodyfont[reset]
\usetypescript[berry][t5]
\usetypescript[postscript][t5]
\setupbodyfont[postscript,12pt]
\starttext
\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 .625red) ;
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 1em{\hss\strut#1\hss}}}
\setMPtext{FunnyFrame}{}
\FrameTitle{Nháng nhán Äánh}
\StartFrame
Nháng nhán Äánh trÃn ÄÃy cà thá ÄÃng, cà thá khÃng ÄÃng!
Nháng nhán Äánh trÃn ÄÃy cà thá ÄÃng, cà thá khÃng ÄÃng!
Nháng nhán Äánh trÃn ÄÃy cà thá ÄÃng, cà thá khÃng ÄÃng!
\StopFrame
\stoptext
-------- end of code --------------------
The text in \StartFrame ....\StopFrame is correctly printed.
But the \FrameTitle is not. I lossed all accented characters.
In Acroread, I found that the framed title uses CMR12 font instead of
VnNimbusRomNo9L-Regu font like the body.
Any help will be very appreciated.
Thank you,
Quy NGUYEN-DAI
_______________________________________________
ntg-context mailing list
[email protected]
http://www.ntg.nl/mailman/listinfo/ntg-context