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 : [email protected] / 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
___________________________________________________________________________________

Reply via email to