From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/75949 Path: news.gmane.org!not-for-mail From: Marco Newsgroups: gmane.comp.tex.context Subject: Re: Font for MetaPost graphics Date: Thu, 3 May 2012 03:13:54 +0200 Message-ID: <20120503031354.4eb059a3@Zewz> References: <20120503020859.65265f12@Zewz> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1336007663 12631 80.91.229.3 (3 May 2012 01:14:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 3 May 2012 01:14:23 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Thu May 03 03:14:22 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SPkcb-0007k1-6P for gctc-ntg-context-518@m.gmane.org; Thu, 03 May 2012 03:14:17 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E9779101ED; Thu, 3 May 2012 03:14:16 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id AhFOZK6Lsp-l; Thu, 3 May 2012 03:14:16 +0200 (CEST) Original-Received: from [127.0.0.1] (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 59750101E8; Thu, 3 May 2012 03:14:15 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5A822101E8 for ; Thu, 3 May 2012 03:14:13 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 16+-ZAhTl7QP for ; Thu, 3 May 2012 03:14:12 +0200 (CEST) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id 77CEF101E6 for ; Thu, 3 May 2012 03:14:12 +0200 (CEST) Original-Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q431EBGR009149 for ; Thu, 3 May 2012 03:14:11 +0200 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SPkcP-0007dC-8J for ntg-context@ntg.nl; Thu, 03 May 2012 03:14:05 +0200 Original-Received: from 83.68.239.197 ([83.68.239.197]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 03 May 2012 03:14:05 +0200 Original-Received: from netuse by 83.68.239.197 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 03 May 2012 03:14:05 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 37 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 83.68.239.197 X-Newsreader: Claws Mail 3.7.8 (GTK+ 2.24.4; i686-pc-linux-gnu) X-Bayes-Prob: 0.329 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=80.91.229.3; country=NO; latitude=62.0000; longitude=10.0000; http://maps.google.com/maps?q=62.0000,10.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0VH5debrq - 5a62cf2d037e - 20120503 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.220 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:75949 Archived-At: On 2012-05-02 Aditya Mahajan wrote: > Metapost now runs as a library. All the text is first typeset by ConTeXt > and metapost only knows the bounding box of the labels. > > You can try (untested): > > \starttext > > This is serif > > \switchtobodyfont[sans] > \startMPcode > draw textext("This should be sans"); > \stopMPcode > > \stoptext This works, of course. However it continues with sans font even after \stopMPcode. This is better (but clumsy): \start \switchtobodyfont[sans] \startMPcode draw textext("This should be sans"); \stopMPcode \stop Here serif again. The text in Metapost adapts to the text set in ConTeXt. But the font setup should *only* be set for MetaPost, not regular text. Does that mean, that MPenvironment is deprecated and does not work at all? Marco ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________