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
VnPenguin said this at Sat, 25 Dec 2004 00:35:36 +0100:
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]
Hello again, Replace all this preamble stuff with something that gets sent to both ConTeXt and MetaFun: \startMPenvironment[global] \enableregime[utf] \setupencoding[default=t5] \loadmapfile[urwvn] \usetypescript[berry][t5] \usetypescript[postscript][t5] \setupbodyfont[postscript,12pt] \stopMPenvironment (BTW, the example text you sent got mangled in mailing--try checking your mailer's encoding.) Also, this was discussed in the archives as recently as July/August. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay, Computing Dept. atl@comp.lancs.ac.uk Lancaster University, InfoLab21 +44(0)1524/510.514 Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
On Sat, 25 Dec 2004 10:20:28 +0000, Adam Lindsay
Hello again,
Replace all this preamble stuff with something that gets sent to both ConTeXt and MetaFun:
\startMPenvironment[global] \enableregime[utf] \setupencoding[default=t5] \loadmapfile[urwvn] \usetypescript[berry][t5] \usetypescript[postscript][t5] \setupbodyfont[postscript,12pt] \stopMPenvironment
Thank you so much. It works well now.
(BTW, the example text you sent got mangled in mailing--try checking your mailer's encoding.)
Hmm, my mailer is .... Google :)
participants (2)
-
Adam Lindsay
-
VnPenguin