Re: [NTG-context] MetaPost integration: default parameters

2009-11-23 Thread luigi scarso
On Mon, Nov 23, 2009 at 10:47 AM, Hans Hagen  wrote:
> why not? it uses gs for converting the shapes to outlines ... works ok
>
> Hans
I will check it with Symbola
http://users.teilar.gr/~g1951d/Symbola.zip
-- 
luigi
___
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
___


Re: [NTG-context] MetaPost integration: default parameters

2009-11-23 Thread Hans Hagen

Mojca Miklavec wrote:

On Sun, Nov 22, 2009 at 20:16, Oliver Buerschaper wrote:

I know there used to be a TeX -> PS -> pstoedit -> MetaPost workflow. Does this 
still work with MkIV?

If you manage to extend dvips to handle OpenType fonts then maybe ...

So does this mean that outline fonts in MetaPost are currently dead with MkIV?


I just said that pstoedit workflow is not likely to work with OpenType
fonts, nothing else.


why not? it uses gs for converting the shapes to outlines ... works ok

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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
___


Re: [NTG-context] MetaPost integration: default parameters

2009-11-23 Thread Mojca Miklavec
On Sun, Nov 22, 2009 at 20:16, Oliver Buerschaper wrote:
>>> I know there used to be a TeX -> PS -> pstoedit -> MetaPost workflow. Does 
>>> this still work with MkIV?
>>
>> If you manage to extend dvips to handle OpenType fonts then maybe ...
>
> So does this mean that outline fonts in MetaPost are currently dead with MkIV?

I just said that pstoedit workflow is not likely to work with OpenType
fonts, nothing else.

You can still use something like (copy-pasting Wolfgang's example
without testing):
textext("{\blue\tfd Fun\llap{\red\property[outer]{\tfd Fun}}}")
or you can use non-OpenType font in MKIV to access the exact path of text.

But I'm really impressed about Taco's answer :)

Mojca
___
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
___


Re: [NTG-context] MetaPost integration: default parameters

2009-11-22 Thread Taco Hoekwater


Oliver Buerschaper wrote:
> Hi Mojca,
> 
>>> Also, is there a way to directly get the glyph outlines of, say, 
>>> $\bigotimes$ in MetaPost code and use it to derive some length
>>> unit from it?
>> Yes, but this only works for Type1 fonts, not for OpenType.
>> 
>> The example below is a literal copy from metapost manual (created
>> by Taco).
> 
> This is quite impressive! This will make it much easier for me to
> obtain the right dimensions…
> 
> Now if only this worked with OpenType as well (or any other font

At some point next year I will rewrite the font backend of luatex,
and at the same time make it a bit more generic. Once that is done,
the new code can be ported to metapost. Don't hold your breath,
it will likely take more than a year.

Best wishes,
Taco
___
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
___


Re: [NTG-context] MetaPost integration: default parameters

2009-11-22 Thread Hans Hagen

Oliver Buerschaper wrote:

I know there used to be a TeX -> PS -> pstoedit -> MetaPost workflow. Does this 
still work with MkIV?

If you manage to extend dvips to handle OpenType fonts then maybe ...


So does this mean that outline fonts in MetaPost are currently dead with MkIV?


it's unrelated to tex ... outlines are ther ebecause of the svg output 
mode of metapost and so providing access made sense; opentype is another 
matter


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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
___


Re: [NTG-context] MetaPost integration: default parameters

2009-11-22 Thread luigi scarso
On Sun, Nov 22, 2009 at 9:33 PM, Wolfgang Schuster
 wrote:
>
> Am 22.11.2009 um 21:15 schrieb luigi scarso:
>
>> %%test-outlined.tex
>> \starttext
>> \startTEXpage
>> \startuseMPgraphic{a}
>> graphictext "\bf Fun" scaled 4 zscaled (1,1.5)
>> withdrawcolor blue
>>   withfillcolor .5white
>>     withpen pencircle scaled 5pt
>> \stopuseMPgraphic
>> \useMPgraphic{a}
>> \stopTEXpage
>> \stoptext
>
> \starttext
> {\blue\tfd Fun\llap{\red\property[outer]{\tfd Fun}}}
> \stoptext

Also from metapost manual

\starttext
\startTEXpage
\startuseMPgraphic{a}
fontmapfile "=lm-ec.map";
  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
\stopuseMPgraphic
\useMPgraphic{a}
\stopTEXpage
\stoptext


-- 
luigi
<>___
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
___


Re: [NTG-context] MetaPost integration: default parameters

2009-11-22 Thread Wolfgang Schuster

Am 22.11.2009 um 21:15 schrieb luigi scarso:

> %%test-outlined.tex
> \starttext
> \startTEXpage
> \startuseMPgraphic{a}
> graphictext "\bf Fun" scaled 4 zscaled (1,1.5)
> withdrawcolor blue
>   withfillcolor .5white
> withpen pencircle scaled 5pt
> \stopuseMPgraphic
> \useMPgraphic{a}
> \stopTEXpage
> \stoptext

\starttext
{\blue\tfd Fun\llap{\red\property[outer]{\tfd Fun}}}
\stoptext


Wolfgang

___
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
___


Re: [NTG-context] MetaPost integration: default parameters

2009-11-22 Thread luigi scarso
On Sun, Nov 22, 2009 at 8:16 PM, Oliver Buerschaper
 wrote:
>>> I know there used to be a TeX -> PS -> pstoedit -> MetaPost workflow. Does 
>>> this still work with MkIV?
>>
>> If you manage to extend dvips to handle OpenType fonts then maybe ...
>
> So does this mean that outline fonts in MetaPost are currently dead with MkIV?

%%test-outlined.tex
\starttext
\startTEXpage
\startuseMPgraphic{a}
graphictext "\bf Fun" scaled 4 zscaled (1,1.5)
 withdrawcolor blue
   withfillcolor .5white
 withpen pencircle scaled 5pt
\stopuseMPgraphic
\useMPgraphic{a}
\stopTEXpage
\stoptext

#context test-outlined

works ok here
-- 
luigi
<>___
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
___


Re: [NTG-context] MetaPost integration: default parameters

2009-11-22 Thread Oliver Buerschaper
>> I know there used to be a TeX -> PS -> pstoedit -> MetaPost workflow. Does 
>> this still work with MkIV?
> 
> If you manage to extend dvips to handle OpenType fonts then maybe ...

So does this mean that outline fonts in MetaPost are currently dead with MkIV?

Oliver
___
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
___


Re: [NTG-context] MetaPost integration: default parameters

2009-11-22 Thread Mojca Miklavec
On Sun, Nov 22, 2009 at 16:53, Oliver Buerschaper wrote:
>
> I know there used to be a TeX -> PS -> pstoedit -> MetaPost workflow. Does 
> this still work with MkIV?

If you manage to extend dvips to handle OpenType fonts then maybe ...

Mojca
___
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
___


Re: [NTG-context] MetaPost integration: default parameters

2009-11-22 Thread Oliver Buerschaper
Hi Mojca,

>> Also, is there a way to directly get the glyph outlines of, say,
>> $\bigotimes$ in MetaPost code and use it to derive some length unit from it?
> 
> Yes, but this only works for Type1 fonts, not for OpenType.
> 
> The example below is a literal copy from metapost manual (created by Taco).

This is quite impressive! This will make it much easier for me to obtain the 
right dimensions…

Now if only this worked with OpenType as well (or any other font format ConTeXt 
understands natively)… and it would be really great if direct access to 
outlines extended to arbitrary typeset material beyond single glyphs. 

I know there used to be a TeX -> PS -> pstoedit -> MetaPost workflow. Does this 
still work with MkIV?

Oliver
___
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
___


Re: [NTG-context] MetaPost integration: default parameters

2009-11-13 Thread Mojca Miklavec
On Fri, Nov 13, 2009 at 17:53, Oliver Buerschaper wrote:
>
> Also, is there a way to directly get the glyph outlines of, say,
> $\bigotimes$ in MetaPost code and use it to derive some length unit from it?

Yes, but this only works for Type1 fonts, not for OpenType.

The example below is a literal copy from metapost manual (created by Taco).

You first search in the source for that glyph:
\definemathsymbol [bigotimes] [op]  [ex] ["4E] % this equals 78 in
decimal notation
and then you need either name or number of glyph + name of font.

fontmapfile "=lm-math.map";
beginfig(1);
  picture q;
  path p;
  interim ahlength := 12bp;
  interim ahangle := 25;
  q := glyph 78 of "lmex10" scaled .2;
%  q := glyph "circlemultiplytext" of "lmex10" scaled .2;
% cheat by looking at lm-mathex.enc
  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;
end.

Mojca
___
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
___