[NTG-context] glyph path

Peter Rolf indiego at gmx.net
Wed Feb 19 19:41:26 CET 2014


Forgot to tell why I need the glyph paths...
I implemented multi path support in drops yesterday and now I want to
test it with some glyphs. Currently I use Inkscape (export the glyph
path as PDF) and pdftoedit to finally get a MP path. Time consuming and
the result still needs a manual clean-up.

Here is my current test example. Needless to say, that the path blew up
my code in the first run (a too low threshold value) :-D

http://www.wuala.com/indiego/public/ConTeXt/pathtest.pdf


Am 19.02.2014 13:25, schrieb Peter Rolf:
> Hi,
> 
> I tried the "Dcaron" example from the MetaPost manual (page 50) and it
> works nicely when called with "mpost".
> 
> % Dcaron.mp
> fontmapfile"=lm-ec.map";
> beginfig(56);
>     picture q;
>     path p;
>     interim ahlength:=12bp;
>     interim ahangle:=25;
>     q:= glyph "Dcaron" of "ec-lmr10" scaled .2;
>     for item within q:
>         p:= pathpart item;
>         drawarrow p withcolor(.6,.9,.6) withpen pencircle scaled 1.5;
>         for j=0 upto length p:
>             pickup pencircle scaled .7;
>             draw (point j of p -- precontrol j of p)
>                 dashed evenly withcolor blue;
>             draw (point j of p -- postcontrol j of p)
>                 dashed evenly withcolor blue;
>             pickup pencircle scaled 3;
>             draw precontrol j of p withcolor red;
>             draw postcontrol j of p withcolor red;
>             pickup pencircle scaled 2;
>             draw point j of p withcolor black;
>         endfor
>     endfor
> endfig;
> % -------
> 
> But how can I get the glyph path(s) with luatex (mplib)?
> 
> Minimal example (glyph.mkiv) and console output are attached (log is
> empty). Looks like I can't use 'fontmapfile' and without it the glyphs
> are not found.
> 
> 
> Peter
> 
> 
> 
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context at 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
> ___________________________________________________________________________________
> 



More information about the ntg-context mailing list