From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/68582 Path: news.gmane.org!not-for-mail From: Otso Helenius Newsgroups: gmane.comp.tex.context Subject: Using text as a clip path for Metafun & free shape paragraphs Date: Sun, 22 May 2011 18:09:33 +0300 Message-ID: <20110522150933.GA12389@innsmouth.lan> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1306076989 17043 80.91.229.12 (22 May 2011 15:09:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 22 May 2011 15:09:49 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sun May 22 17:09:44 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QOAHo-0001Vm-5R for gctc-ntg-context-518@m.gmane.org; Sun, 22 May 2011 17:09:44 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8ADC0CAD04; Sun, 22 May 2011 17:09:42 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 7m0PI6MKEd3m; Sun, 22 May 2011 17:09:40 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 10CDBCAD13; Sun, 22 May 2011 17:09:40 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DAE44CAD13 for ; Sun, 22 May 2011 17:09:38 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id MrSjWQUQ4K6a for ; Sun, 22 May 2011 17:09:36 +0200 (CEST) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id 27B79CAD04 for ; Sun, 22 May 2011 17:09:36 +0200 (CEST) Original-Received: from innsmouth.pi-xi.net (pi-xi.net [83.145.207.200]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p4MF9YJd026926 for ; Sun, 22 May 2011 17:09:35 +0200 Original-Received: by innsmouth.pi-xi.net (Postfix, from userid 500) id DB9981C05D2; Sun, 22 May 2011 18:09:33 +0300 (EEST) Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-12-10) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=83.145.207.200; country=FI; region=13; city=Espoo; latitude=60.2167; longitude=24.6667; http://maps.google.com/maps?q=60.2167,24.6667&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0eEKD9zRN - 770f379f5725 - 20110522 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 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:68582 Archived-At: Thanks to Wolfgang for the instructions on changing fonts, \switchtobodyfont works as expected. I still have to dig up the exact definitions of both \switchtobodyfont and \switchtotypeface, as the latter command seems to work in Hans' examples (for example showfont.pdf) but not with my installation. Now, I've been trying to use metapost for achieving magazine type layout with ConTeXt, and have a question about the following features: 1) Is it possible to use TeX typeset text as a clipping path for MP graphics? What I would like to achieve is a similar cut mask as seen in this picture: https://modernpost.files.wordpress.com/2009/10/rockstar11091.jpg i.e. the text outline cuts a hole in the brown filled rectangle revealing the bitmap below. I can cut pictures easily with paths in MP like so: \startMPcode fill unitsquare xysized (100mm,100mm) withcolor green; picture cur; cur := currentpicture; currentpicture := nullpicture; fill unitsquare xysized (100mm,100mm) withcolor blue; path mask; mask := unitsquare xysized (100mm,100mm) -- reverse unitsquare xysized (100mm,10mm) shifted (0mm,45mm) -- cycle; clip cur to mask; draw cur; \stopMPcode But I can't cut pictures with pictures (only with masks), nor have I found a way in any of the manuals (mmakempy.pdf, metafun-p.pdf, metapostmanual.pdf) to output text outline as paths which could be used for cutting a hole in the mask picture. Is this possible? 2) MP gives an easy way to format free flowing paragraph shapes similar to this image: http://www.davidlcade.com/images/gropius/g2.png . I have followed the instructions on pages 435-444. The problem with this approach is that the text which will be placed in a freely shaped paragraph will be a separate block which won't flow freely with other text in the document body if the contents on earlier pages change. I guess this drops in the category of big feature requests, but it would be nice to be able to define the shapes and positions of ConTeXt columns/paragraphs with MP graphics. In InDesign columns of any shape anywhere on the page can be connected without having to separate one block of text from the rest. With this feature one could define for example a 2-page spread for a magazine (with free shape graphics and columns) in between two ordinarily defined pages and would not have to manually disrupt the body text flow through the document. Best regards, Otso Helenius ___________________________________________________________________________________ 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 ___________________________________________________________________________________