From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/17629 Path: main.gmane.org!not-for-mail From: VnPenguin Newsgroups: gmane.comp.tex.context Subject: metafun example & utf8 input problem Date: Sat, 25 Dec 2004 00:35:36 +0100 Message-ID: Reply-To: VnPenguin , mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1103931483 25838 80.91.229.6 (24 Dec 2004 23:38:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 24 Dec 2004 23:38:03 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Sat Dec 25 00:37:57 2004 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Chz0P-0006jD-00 for ; Sat, 25 Dec 2004 00:37:57 +0100 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 82CB31278E; Sat, 25 Dec 2004 00:37:56 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 20973-04; Sat, 25 Dec 2004 00:37:56 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id EC34F1278C; Sat, 25 Dec 2004 00:35:40 +0100 (CET) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 045F81278C for ; Sat, 25 Dec 2004 00:35:39 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 20973-03 for ; Sat, 25 Dec 2004 00:35:38 +0100 (CET) Original-Received: from rproxy.gmail.com (unknown [64.233.170.198]) by ronja.ntg.nl (Postfix) with ESMTP id 01F30126F8 for ; Sat, 25 Dec 2004 00:35:37 +0100 (CET) Original-Received: by rproxy.gmail.com with SMTP id f1so76101rne for ; Fri, 24 Dec 2004 15:35:36 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=fPcl3BHO/yLBPklQKpwMsM+j4JRUmz61R9iq3l2cr3yc6S2Gz6N+qT4CYf/9DBr0r4Guhz3GbE9MUDbvjxDQz3f1Z9iBK/Q+LrnVyHX+WFosjAqAGvxQYICHdmQg/m8pvHllGPntDmb2Cv7uppkKkJOfkCpOMRsS5eNQXshaB3A= Original-Received: by 10.38.125.64 with SMTP id x64mr297364rnc; Fri, 24 Dec 2004 15:35:36 -0800 (PST) Original-Received: by 10.38.67.14 with HTTP; Fri, 24 Dec 2004 15:35:36 -0800 (PST) Original-To: ConTeXt users X-Virus-Scanned: by amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: by amavisd-new at ntg.nl Xref: main.gmane.org gmane.comp.tex.context:17629 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:17629 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=3Dt5] \loadmapfile[urwvn] \usetypescript[all][computer-modern][t5] \setupbodyfont[reset] \usetypescript[berry][t5] \usetypescript[postscript][t5] \setupbodyfont[postscript,12pt] \starttext \startuseMPgraphic{FunnyFrame}=20 picture p ;=20 numeric w, h, o ;=20 p :=3D textext.rt(\MPstring{FunnyFrame}) ;=20 w :=3D OverlayWidth ;=20 h :=3D OverlayHeight ;=20 o :=3D BodyFontSize ;=20 p :=3D p shifted (2o,h-ypart center p) ;=20 draw p ;=20 drawoptions (withpen pencircle scaled 1pt withcolor .625red) ;=20 draw (2o,h)--(0,h)--(0,0)--(w,0)--(w,h)--(xpart urcorner p,h) ;=20 draw boundingbox p ;=20 setbounds currentpicture to unitsquare xyscaled(w,h) ;=20 \stopuseMPgraphic \defineoverlay =09[FunnyFrame] =09[\useMPgraphic{FunnyFrame}] \defineframedtext =09[FunnyText] =09[frame=3Doff,background=3DFunnyFrame] \def\StartFrame{\startFunnyText}=20 \def\StopFrame {\stopFunnyText }=20 \def\FrameTitle#1%=20 =09{\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut#1\hss}}}=20 \setMPtext{FunnyFrame}{} \FrameTitle{Nh=E1=BB=AFng nh=E1=BA=ADn =C4=91=E1=BB=8Bnh}=20 \StartFrame=20 Nh=E1=BB=AFng nh=E1=BA=ADn =C4=91=E1=BB=8Bnh tr=C3=AAn =C4=91=C3=A2y c=C3= =B3 th=E1=BB=83 =C4=91=C3=BAng, c=C3=B3 th=E1=BB=83 kh=C3=B4ng =C4=91=C3=BA= ng! Nh=E1=BB=AFng nh=E1=BA=ADn =C4=91=E1=BB=8Bnh tr=C3=AAn =C4=91=C3=A2y c=C3= =B3 th=E1=BB=83 =C4=91=C3=BAng, c=C3=B3 th=E1=BB=83 kh=C3=B4ng =C4=91=C3=BA= ng! Nh=E1=BB=AFng nh=E1=BA=ADn =C4=91=E1=BB=8Bnh tr=C3=AAn =C4=91=C3=A2y c=C3= =B3 th=E1=BB=83 =C4=91=C3=BAng, c=C3=B3 th=E1=BB=83 kh=C3=B4ng =C4=91=C3=BA= ng! \StopFrame \stoptext -------- end of code -------------------- The text in \StartFrame ....\StopFrame is correctly printed.=20 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