Skip to content

vtkTextActor3D cropped output due to FreeType bounding box rounding

The vtkTextActor3D produces a (one pixel) cropped text:

cropped

This is specially visible around the 0 that have straight borders.

I think it is due to vtkFreeTypeTools::CalculateBoundingBox: it does some rounding of floating point with rotateVector2i and use the result to set an integer bounding box (that will define image data extent).

Inflating the resulting box by a unit gives the following result:

text-no-crop

Screenshots come from the TestAxisActor3D test.

Edited by Nicolas Vuaille