[vtk-developers] Re: vtkVectorText beyond ASCII - solution
Michail Vidiassov
master at iaas.msu.ru
Wed Jan 9 21:58:19 EST 2008
Dear Sean and All,
On Wed, 9 Jan 2008, Sean McBride wrote:
>> On the other hand, my version is not a proper replacement for
>> vtkVectorText yet, since that point size problem is not solved yet.
>
> I'm not sure about this 'point problem' though.....
When a text string is rendered vtkVectorText advances
0.4 horizontally for a space and
1.4 vertically for a new line.
It assumes certain font size.
FreeType measures fonts in points.
FTGL uses OpenGL units.
I do not understand what point size to use.
There is a couple of #defined constants in the font
generating utility (point size and the factor the resulting coordinates
are devided by) I have set somehow, but the resulting text is smaller then
vtkVectorText.
It would be nice to know what the result is supposed to be like.
(For example - "vector glyph in vtk must be at most 1.2 units high" or
"one point equals 0.1 vtk unit").
Thus the question about relation between point size, OpenGL and VTK units.
(Offtopic.
Such questions are typical for an occasional OpenSource coder, who
makes changes in other's code while having only a wague ideas on what that
code is supposed to do, to say nothing about how...
On the other hand, in the "good old days, when computers were big and
terminals green" I remember using lengthy pieces of job description code
that no one understood, but just reused to compile every next program -
from CS Ph.D. projects to "Hello, World!" /* or rather solving
a*x^2+b*x+c=0, that was the standard for the first program in my time */
Another OpenSource analogy is Soviet era cars - before you could drive
your new car you had to fix it for assembly errors and faulty parts -
on the other hand the design was simple and well-known enough to allow
amateur maintenance.)
As to the vtkVectorText performance issue - I would like to know what were
the reasons to make it as ugly as it is ;)
On the plus side - if the polygon count in the existing vtkVectorText
glyphs is low (are they hand-crafted?), then after eliminating on-the fly
parsing the existing set will be really nice - small, fast, backwards
compatible and covering 90% of needs.
Sincerely, Michail
More information about the vtk-developers
mailing list