[metapost] Strange infont results

Ovidiu Gheorghies ogh at info.uaic.ro
Fri Jul 8 09:29:36 CEST 2005


Hello.

I have some questions regarding the output of the following code:

  boxjoin(a.sw=b.nw);
  boxit.s0("<<stereotype>>" infont "tyxtt" );
  boxit.s1("<<a>>, <<b>>, <<c>>" infont "tyxtt");
  boxit.g0("[guard] " infont "tyxtt");
  boxit.g1("[stillhungry] closing paranthesis SHOWN after hungry !" infont "tyxtt");
  boxit.g2("[still hungry] closing paranthesis NOT shown after hungry !" infont "tyxtt");
  boxit.g3("[][][][]hm]" infont "tyxtt");
  boxit.c0("{constraint}" infont "tyxtt");
  boxit.c1("{a constraint} closing paranthesis NOT shown !" infont "tyxtt");
  
  drawboxed(s0, s1, g0, g1, g2, g3, c0, c1);

- For s0 and s1: ``<<'' and ``>>'' are replaced by one corresponding 
specific character, but the bounding box is larger than the text: 
the more such characters exist, the longer than the resulting text the 
bounding box is.

- For g0..g3: in g2 the closing ``]'' is not shown, but in all other it's 
shown. Why?

- For c0 and c1: in c1 the closing ``}'' is not shown, unlike in c0. Why? 

You can see the result of this code in the MetaUML manual version 0.0.2, 
section Test Suite/Fonts, available here: http://metauml.sourceforge.net/

It seems that the triggering factor is the presence of a space before
``}'' or ``]''. The problem has nothing to do with the boxes package.

Thanks in advance,
Ovidiu Gheorghies



More information about the metapost mailing list