I guess the only advantage of vtkVectorText is that it is a source that produces polygonal letters. It can be used in a pipeline.<br><br><div class="gmail_quote">On Tue, Oct 16, 2012 at 1:09 PM, David Lonie <span dir="ltr"><<a href="mailto:david.lonie@kitware.com" target="_blank">david.lonie@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi list,<br>
<br>
I'm writing an (optional) extension to VTK that will override<br>
vtkTextActor with a "smart" math text actor that will switch between<br>
FreeType rendering for plain text and MathText equation rendering for<br>
strings containing MathText markup. The plan is to enable this in<br>
ParaView, so that any visible text field in a RenderView will<br>
automatically have the ability to display equations.<br>
<br>
To this end, I've added a vtkSmartMathTextActor and<br>
vtkSmartMathTextActor3D, designed to be drop-in replacements for<br>
vtkTextActor and vtkTextActor3D. Unfortunately, most of the 3D text<br>
rendering in VTK/ParaView is done using vtkVectorText, which is quite<br>
different from the other classes.<br>
<br>
While vtkTextActor3D is a stand-alone actor that uses FreeType to<br>
generate a texture which is rendered to the device, vtkVectorText<br>
derives from PolyDataAlgorithm and simply assembles hardcoded<br>
polydata, character by character.<br>
<br>
I propose a long-term deprecation period for vtkVectorText, favoring<br>
vtkTextActor3D, for the following reasons:<br>
<br>
* Limited supported character set:<br>
Only ascii codes 33-126 + '\n' are available<br>
* Limited font support:<br>
Only a single hardcoded sans-serif font is available,<br>
while FreeType has at least serif, sans-serif, and monospace,<br>
as well as (optional) font config support for access to<br>
system fonts.<br>
* No font properties:<br>
In addition to only a single font family, there is only one<br>
version of it. vtkVectorText doesn't know anything about<br>
vtkTextProperty, so bold, italics, justification, linespacing,<br>
etc, etc are fixed.<br>
* Inflexible for providing custom implementations:<br>
Polydata output is quite unusual for a text layout engine,<br>
and producing such is difficult to re-implement.<br>
<br>
In short, there just doesn't seem to be much reason for keeping this<br>
class around when there is a much more powerful, easier-to-use<br>
alternative.<br>
<br>
While I think there is a strong argument for using vtkTextActor3D<br>
instead of vtkVectorText, perhaps deprecating the class would be<br>
overkill. In that case, I suggest encouraging new code to use the<br>
vtkTextActor3D class, and to start refactoring existing classes (e.g.<br>
vtkAxisActor, etc) to use vtkTextActor3D internally.<br>
<br>
Thoughts? Suggestions? Agreement? Disagreement?<br>
<br>
Dave<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br><br>