[vtk-developers] dancing fonts

David Gobbi dgobbi at imaging.robarts.ca
Mon Jul 22 16:52:41 EDT 2002


On Mon, 22 Jul 2002, Sebastien BARRE wrote:

> I changed the code so that the bbox is now the sum of the "advance widths".
> This will result in a larger BBox, thus in slightly smaller fonts since VTK
> sets the font size by trying to fit the bbox inside the area defined by the
> vtkActor2D's PositionCoordinate.
>
> What do you think ?

This fixes the horizontal dancing of fixed-width fonts, but there is still
a problem with vertical dancing.  For example, change the font to 'Times'
in the example I sent you.

The vertical problem is actually more disturbing than the horizontal
problem, because if for example you try to center two pieces of text
at the same vertical position and one piece of text has a descender,
e.g if one piece of text is 'yes' and the other is 'no', then the
two bits of text are rendered at slightly different vertical positions.

 - David




More information about the vtk-developers mailing list