[metapost] is it possible to strike glyphs' paths?

Laurent Méhats laurent.mehats at gmail.com
Fri Jan 28 15:55:21 CET 2011


Le 28/01/2011 02:02, Stephan Hennig a écrit :
> schrieb Laurent Méhats:
> 
>>       txt_wd:=txt_wd+
>>         (xxpart tkn)*xpart urcorner (sub_str infont fnt_str);
>>     endfor
> 
> An interesting workaround.

Well, if this is not totally accurate for the problem at hand, we may draw
the btex .. etex material ourselves according to what we got from init,
that is replace 'draw pct;' with:

picture bg_pct;
bg_pct:=currentpicture;
for i=0 upto glp_num-1:
  for j=0 upto pth_num[i]-1:
    if turningnumber glp_pth[i][j]=1:
      fill glp_pth[i][j];
    else:
      picture aux_pct;
      aux_pct:=bg_pct;
      clip aux_pct to glp_pth[i][j];
      draw aux_pct;
    fi
  endfor
endfor
for i=0 upto stk_num-1:
  draw stk_pth[i]
    withpen pencircle scaled stk_thk[i];
endfor

This is very dishonest, but the result may look nicer :)

Regards,
Laurent Méhats



More information about the metapost mailing list