MantisBT - VTK
View Issue Details
0013152VTK(No Category)public2012-05-07 08:442013-06-26 07:51
Pof 
David C. Lonie 
normalminorhave not tried
closedfixed 
5.8.0 
6.0.1 
Kitware
incorrect functionality
0013152: vtkTextActor->ShadowOn() : very bad looking
When activating shadows for a vtkTextActor,
the general look of the text (by far) not as readable as it used to be in vtk5.0.0, which sometimes makes it almost unreadable.
See the two examples in the attached image for a better view of the problem.
No tags attached.
png Text Shadow.png (76,350) 2012-05-07 08:44
https://www.vtk.org/Bug/file/9187/Text%20Shadow.png
png

cxx vtkFreeTypeUtilities.cxx (57,515) 2012-05-07 11:53
https://www.vtk.org/Bug/file/9188/vtkFreeTypeUtilities.cxx
png Corrected 5.10.0.png (37,583) 2012-05-07 11:59
https://www.vtk.org/Bug/file/9189/Corrected%205.10.0.png
png

cpp Test_vtkTextActor.cpp (2,832) 2012-05-07 12:08
https://www.vtk.org/Bug/file/9190/Test_vtkTextActor.cpp
Issue History
2012-05-07 08:44PofNew Issue
2012-05-07 08:44PofFile Added: Text Shadow.png
2012-05-07 11:53PofFile Added: vtkFreeTypeUtilities.cxx
2012-05-07 11:55PofNote Added: 0028580
2012-05-07 11:59PofFile Added: Corrected 5.10.0.png
2012-05-07 11:59PofNote Edited: 0028580bug_revision_view_page.php?bugnote_id=28580#r434
2012-05-07 12:07PofNote Edited: 0028580bug_revision_view_page.php?bugnote_id=28580#r435
2012-05-07 12:08PofFile Added: Test_vtkTextActor.cpp
2012-05-07 12:12PofNote Edited: 0028580bug_revision_view_page.php?bugnote_id=28580#r436
2012-05-07 12:12PofNote Edited: 0028580bug_revision_view_page.php?bugnote_id=28580#r437
2012-05-07 12:15PofNote Edited: 0028580bug_revision_view_page.php?bugnote_id=28580#r438
2012-05-10 13:51Dave DeMarleNote Added: 0028587
2013-06-25 17:00Dave DeMarleNote Added: 0031076
2013-06-26 07:50David C. LonieAssigned To => David C. Lonie
2013-06-26 07:50David C. LonieStatusbacklog => tabled
2013-06-26 07:51David C. LonieNote Added: 0031083
2013-06-26 07:51David C. LonieStatustabled => closed
2013-06-26 07:51David C. LonieResolutionopen => fixed
2013-06-26 07:51David C. LonieFixed in Version => 6.0.1

Notes
(0028580)
Pof   
2012-05-07 11:55   
(edited on: 2012-05-07 12:15)
The error comes from 2 methods in vtkFreeTypeUtilities :
- GetBoundingBox
- PopulateImageData

Attached is the corrected source file which solves the problem (see the last image).

Worth mentionning that the original patch was submitted 2 years ago by Roger Bramon (see http://vtk.org/Bug/view.php?id=9618 [^]), and it was supposed to be incorporated in version 5.8.0 (see Markus comment).
Here, I just included this patch into the last version (i.e. 5.10.0_RC3) of the vtkFreeTypeUtilities.cxx file.


Last, the source used to generate the image is given (Test_vtkTextActor.cpp).

(0028587)
Dave DeMarle   
2012-05-10 13:51   
commit: 35944bf09ccba7f42eb014678033395405feb9a9
brings Pof's fix into VTK.

TODO: Turn Test_vtkTextActor into a regression test.
(0031076)
Dave DeMarle   
2013-06-25 17:00   
Ended up taking this out before 5.10.0 as it lead to a /0 in regression tests.
(0031083)
David C. Lonie   
2013-06-26 07:51   
This bug is no longer present since the switch to vtkFreeTypeTools/vtkTextRenderer.