From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/87230 Path: news.gmane.org!not-for-mail From: ralf.waldvogel@pta.de Newsgroups: gmane.comp.tex.context Subject: [Metapost] Using mkIV and metapost to produce SVG Date: Mon, 5 May 2014 13:54:33 +0200 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0962628937==" X-Trace: ger.gmane.org 1399392310 13133 80.91.229.3 (6 May 2014 16:05:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 6 May 2014 16:05:10 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Tue May 06 18:05:06 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WhhqS-0005Yw-Rb for gctc-ntg-context-518@m.gmane.org; Tue, 06 May 2014 18:03:53 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id F31D310210 for ; Mon, 5 May 2014 13:54:53 +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 0wxu5BlZ1n33 for ; Mon, 5 May 2014 13:54:53 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 612871022D for ; Mon, 5 May 2014 13:54:50 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6444C101E2 for ; Mon, 5 May 2014 13:54:46 +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 WkbyD+bvSNH0 for ; Mon, 5 May 2014 13:54:44 +0200 (CEST) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id E3F90101E1 for ; Mon, 5 May 2014 13:54:36 +0200 (CEST) Original-Received: from mail2.pta.de (mail2.pta.de [212.184.120.6]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s45BsZBX027751 for ; Mon, 5 May 2014 13:54:35 +0200 Original-Received: by mail2.pta.de (Postfix, from userid 110) id 282DE760BB; Mon, 5 May 2014 13:54:35 +0200 (CEST) X-Virus-Scanned: by SpamTitan at pta.de Importance: Normal X-Priority: 3 (Normal) In-Reply-To: Original-References: X-Mailer: Lotus Domino Web Server Release 8.5.3FP6 November 21, 2013 X-MIMETrack: Serialize by HTTP Server on domino1/PTA_GL/De(Release 8.5.3FP6|November 21, 2013) at 05.05.2014 13:54:33, Serialize complete at 05.05.2014 13:54:33, Serialize by Router on domino1/PTA_GL/De(Release 8.5.3FP6|November 21, 2013) at 05.05.2014 13:54:33 X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=212.184.120.6; country=DE; latitude=51.0000; longitude=9.0000; http://maps.google.com/maps?q=51.0000,9.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0QLWbSzPT - 775aff515a57 - 20140505 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:87230 Archived-At: --===============0962628937== Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
D= ear all,

I would like to produce an svg file from a Metapost input file usin= g some of ConTeXt's typesetting features (esp. using System OTF Fonts) usin= g something like:

\startbuffer[buffer:dummy]
    \s= tart
        \startcolor[white]
&nb= sp;       \framed[align=3Dmiddle,width=3D28mm,frame=3Doff]
        {
        \SansBod= yBold % Font definition done earlier
Test to \par
rendered \par
 =       }
        \stopc= olor
    \stop
\stopbuffer

% ....
<= div style=3D"font-family: Verdana, Arial, Helvetica, sans-serif;">

=
\startuniqu= eMPgraphic{mp:margin}    
    pic= ture text;
    text :=3D btex \getbuffer[buffer:dummy] = etex;
    draw text shifted(-11.8mm,-4.8mm );
=
=    % Some more fancy drawing her
\stopuniqueMPgraphic

Can I render that with MetaPost to SVG?
Is it possible to render text as path= s not as referenced glyphs in MetaPost/ConTexT?


Unfortunately I have to st= ick to SVG as the resulting output format.
Converting from PDF to SVG is not a= n option at the moment due a) performance considerations and b) trouble wit= h generated font names in the resulting ConTeXt PDF file (inkscape as well = as pdf2svg produce real strange results). 
 

Please let me know, if y= ou need furhter information.
Thank you very much in advance.
Kind regards,

Ralf<= /div>
--===============0962628937== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============0962628937==--