From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/15071 Path: main.gmane.org!not-for-mail From: Willi Egger Newsgroups: gmane.comp.tex.context Subject: Re: special characters and \startuseMPgraphic{FunnyFrame} Date: Mon, 03 May 2004 20:57:36 +0200 Sender: ntg-context-admin@ntg.nl Message-ID: <40969620.8040102@boede.nl> References: <4096920B.8070209@gmx.de> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1083610766 493 80.91.224.253 (3 May 2004 18:59:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 3 May 2004 18:59:26 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Mon May 03 20:59:16 2004 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BKieq-0004H2-00 for ; Mon, 03 May 2004 20:59:16 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 4D71310B15; Mon, 3 May 2004 20:55:12 +0200 (MEST) Original-Received: from smtp-out3.xs4all.nl (smtp-out3.xs4all.nl [194.109.24.13]) by ref.ntg.nl (Postfix) with ESMTP id ADF9210B15 for ; Mon, 3 May 2004 20:53:35 +0200 (MEST) Original-Received: from boede.nl (a80-126-172-1.adsl.xs4all.nl [80.126.172.1]) by smtp-out3.xs4all.nl (8.12.10/8.12.10) with ESMTP id i43IvZYN016295 for ; Mon, 3 May 2004 20:57:35 +0200 (CEST) User-Agent: Mozilla Thunderbird 0.6+ (Windows/20040417) X-Accept-Language: en-us, en Original-To: ntg-context@ntg.nl In-Reply-To: <4096920B.8070209@gmx.de> Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:15071 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:15071 Hi Helmut, In order to make it work you need to setup the bodyfont. Furthermore it is needed to let MetaPost know which font to use. See below. Here your code gives the expected result. Grüße Willi Helmut Schwertner wrote: > 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 \usetypescript[palatino][texnansi] \setupbodyfont[palatino,rm,12pt] \startMPenvironment \usetypescript[palatino][texnansi] \setupbodyfont[palatino,rm,14pt] \stopMPenvironment > \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 > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context