[vtk-developers] dancing fonts
David Gobbi
dgobbi at imaging.robarts.ca
Mon Jul 22 11:36:02 EDT 2002
Hi Sebastien,
I've attached an example. I'm guessing that the fix will require that,
instead of simply using a bounding box to set the justification, you
will have to calculate the box width & height for fixed-width fonts using
the nominal font size. For proportional fonts, you will have to
calculate the height but use the bounding box to get the width.
- David
On Mon, 22 Jul 2002, Sebastien BARRE wrote:
> Hi David,
>
> At 7/22/2002 10:46 AM, David Gobbi wrote:
>
> >If the justification is handled by the FreeType libraries themselves
> >then it is best to leave things as they are. But if the justification
> >is handled inside VTK, is there an easy way to fix this so that
> >Centered justification doesn't cause dynamic labels to dance around?
>
> The justification is handled inside VTK, the only info VTK requests from
> FreeType is the bounding box of the text to render (which is then rendered
> by FTGL+FreeType). Justification and text positioning is set within VTK. I
> guess some rounding pb occurs. Are you using *only* numbers ? Can you send
> me a script that would show this behaviour ?
>
> Thanks
>
>
> --
> Sebastien Barre
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dancing.tcl
Type: application/x-tcl
Size: 695 bytes
Desc:
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20020722/729e681c/attachment-0001.tcl>
More information about the vtk-developers
mailing list