ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: VnPenguin <vnpenguin@gmail.com>
Subject: metafun example & utf8 input problem
Date: Sat, 25 Dec 2004 00:35:36 +0100	[thread overview]
Message-ID: <e5d3f2650412241535721677f8@mail.gmail.com> (raw)

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

             reply	other threads:[~2004-12-24 23:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-24 23:35 VnPenguin [this message]
2004-12-25 10:20 ` Adam Lindsay
2004-12-25 19:01   ` VnPenguin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e5d3f2650412241535721677f8@mail.gmail.com \
    --to=vnpenguin@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).