<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    <title></title>
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Roger,<br>
    I've just tested the UTF8 patch, and yes it also works in my case.<br>
    This is great, it seems that all these characters problems (shadow +
    accentuated characters) are solved now.<br>
    Hopefully, these patches will be included in the next release.<br>
    Thanks a lot for your help.<br>
    Pof<br>
    <br>
    Le 08/09/2010 22:21, Roger Bramon Feixas a &eacute;crit&nbsp;:
    <blockquote
      cite="mid:AANLkTim6yAi5b=6s=NRA4hPD3=_XaN1fPvfmhB5DogOb@mail.gmail.com"
      type="cite"><span class="Apple-style-span" style="font-family:
        arial,sans-serif; font-size: 13px; border-collapse: collapse;
        color: rgb(34, 34, 34);">Thank you Pof to test it! Now, I hope
        it will be applied to the dev branch.
        <div><br>
        </div>
        <div>Yes, the problem with accentuated characters is already
          solved. Therefore, next VTK release will not have that
          problem. However, if you are interested on it now, you can
          apply this patch:&nbsp;<a moz-do-not-send="true"
href="http://vtk.org/gitweb?p=VTK.git;a=patch;h=331a44656276882766248c1f8e338434b40226ef"
            target="_blank" style="color: rgb(53, 66, 88);">http://vtk.org/gitweb?p=VTK.git;a=patch;h=331a44656276882766248c1f8e338434b40226ef</a>.</div>
        <div><br>
        </div>
        <div>Let me know if it works.</div>
        <div><br>
        </div>
        <div><font color="#888888">Roger</font></div>
      </span><br>
      <div class="gmail_quote">On Wed, Sep 8, 2010 at 1:18 PM, pof <span
          dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:jd379252@gmail.com">jd379252@gmail.com</a>&gt;</span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          <div bgcolor="#ffffff" text="#000000"> Hi Roger,<br>
            I applied your patch to vtk5.6.0, and this fully solve the
            shadow problem, great!<br>
            Still I 've got this problem with accuentuated characters
            (which of course was your patch was aiming to solve). If I
            understand well your reponse, this is already solved in the
            dev branch, am I correct?<br>
            Pof<br>
            <br>
            Le 06/09/2010 08:52, Roger Bramon Feixas a &eacute;crit&nbsp;:
            <div>
              <div class="h5">
                <blockquote type="cite">Hi Pof,
                  <div><br>
                  </div>
                  <div>Since&nbsp;VTK 5.2.0, vtkTextActor is rendered using
                    glyphs instead of OpenGL. I also had that problem
                    but it was solved in that commit <a
                      moz-do-not-send="true"
href="http://vtk.org/gitweb?p=VTK.git;a=commit;h=331a44656276882766248c1f8e338434b40226ef"
                      target="_blank">http://vtk.org/gitweb?p=VTK.git;a=commit;h=331a44656276882766248c1f8e338434b40226ef</a>
                    when UTF8 text rendering was enabled. It's after VTK
                    5.6 was released.</div>
                  <div><br>
                  </div>
                  <div>On the other hand, I suppose you still have
                    problems rendering text with shadow, as you reported
                    in that issue: <a moz-do-not-send="true"
                      href="http://vtk.org/Bug/view.php?id=9618"
                      target="_blank">http://vtk.org/Bug/view.php?id=9618</a>.
                    I tried to solve it and I attached a patch in that
                    issue waiting for feedback. It would be wonder if
                    you could test it and let me know if it works well.</div>
                  <div><br>
                  </div>
                  <div>Thanks,</div>
                  <div><br>
                  </div>
                  <div>Roger</div>
                  <div><br>
                    <br>
                    <div class="gmail_quote">On Fri, Sep 3, 2010 at 2:12
                      PM, Pof <span dir="ltr">&lt;<a
                          moz-do-not-send="true"
                          href="mailto:jd379252@gmail.com"
                          target="_blank">jd379252@gmail.com</a>&gt;</span>
                      wrote:<br>
                      <blockquote class="gmail_quote" style="margin: 0pt
                        0pt 0pt 0.8ex; border-left: 1px solid rgb(204,
                        204, 204); padding-left: 1ex;">Hi all,<br>
                        <br>
                        I am having trouble displaying accentuated
                        characters in vtkTextActor with vtk5.6.0 under
                        MS-VC++2005.<br>
                        Here below is an exemple that reproduces the
                        problem, by printing the same string than
                        contains accents "&eacute;,&egrave;,&agrave;".<br>
                        When I run this small prog, as a result I obtain
                        that accentuated characters (&eacute;,&egrave;...) are :<br>
                        - correctly displayed when used in a
                        vtkScalarBarActor title,<br>
                        - not displayed when incorporated in
                        vtkTextActor.<br>
                        <br>
                        Any idea where does this come from and how to
                        solve it?<br>
                        <br>
                        As an additional comment, this used to work
                        correctly under vtk5.0.x, it is only broken from
                        vtk5.2.x up to vtk5.6.0.<br>
                        <br>
                        Thanks<br>
                        JD<br>
                        <br>
                        <br>
//////////////////////////////////////////////////////<br>
                        ////////////////// vtkTextActor bug
                        //////////////////<br>
//////////////////////////////////////////////////////<br>
                        #include "vtkActor.h"<br>
                        #include "vtkRenderer.h"<br>
                        #include "vtkRenderWindow.h"<br>
                        #include "vtkRenderWindowInteractor.h"<br>
                        #include "vtkCamera.h"<br>
                        #include "vtkTextProperty.h"<br>
                        #include "vtkTextActor.h"<br>
                        #include "vtkActor2D.h"<br>
                        #include "vtkLookupTable.h"<br>
                        #include "vtkScalarBarActor.h"<br>
                        <br>
                        int main()<br>
                        {<br>
                        &nbsp;&nbsp;&nbsp; // Tested string<br>
                        &nbsp;&nbsp;&nbsp; char text[] = "Test: &eacute;, &egrave;, &agrave;";<br>
                        <br>
                        &nbsp;&nbsp;&nbsp; // Create an example text actor<br>
                        &nbsp;&nbsp;&nbsp; vtkTextActor *textActor =
                        vtkTextActor::New();<br>
                        &nbsp;&nbsp;&nbsp; textActor-&gt;SetInput(text);<br>
                        &nbsp;&nbsp;&nbsp;
textActor-&gt;GetPositionCoordinate()-&gt;SetCoordinateSystemToNormalizedViewport();<br>
                        &nbsp;&nbsp;&nbsp; textActor-&gt;SetPosition(0.50,0.50);<br>
                        &nbsp;&nbsp;&nbsp;
                        textActor-&gt;GetTextProperty()-&gt;SetFontSize(30);<br>
                        &nbsp;&nbsp;&nbsp;
                        textActor-&gt;GetTextProperty()-&gt;SetJustificationToCentered();<br>
                        &nbsp;&nbsp;&nbsp;
                        textActor-&gt;GetTextProperty()-&gt;SetColor(1,
                        0, 0);<br>
                        <br>
                        &nbsp;&nbsp;&nbsp; // Create a Lut<br>
                        &nbsp;&nbsp;&nbsp; vtkLookupTable *Lut = vtkLookupTable::New();<br>
                        &nbsp;&nbsp;&nbsp; Lut-&gt;SetHueRange (160.0/240.0, 0.0);<br>
                        &nbsp;&nbsp;&nbsp; Lut-&gt;SetSaturationRange (1.0, 1.0);<br>
                        &nbsp;&nbsp;&nbsp; Lut-&gt;SetValueRange (1.0, 1.0);<br>
                        &nbsp;&nbsp;&nbsp; Lut-&gt;SetTableRange (0,100);<br>
                        &nbsp;&nbsp;&nbsp; Lut-&gt;Build();<br>
                        <br>
                        &nbsp;&nbsp;&nbsp; // Create a ScalarBarActor<br>
                        &nbsp;&nbsp;&nbsp; vtkScalarBarActor *scalarBar =
                        vtkScalarBarActor::New();<br>
                        &nbsp;&nbsp;&nbsp; scalarBar-&gt;SetTitle(text);<br>
                        &nbsp;&nbsp;&nbsp; scalarBar-&gt;SetLookupTable(Lut);<br>
                        &nbsp;&nbsp;&nbsp; scalarBar-&gt;SetHeight(0.5);<br>
                        &nbsp;&nbsp;&nbsp; scalarBar-&gt;SetWidth(0.1);<br>
                        &nbsp;&nbsp;&nbsp; scalarBar-&gt;SetPosition(0.10,0.01);<br>
                        &nbsp;&nbsp;&nbsp; scalarBar-&gt;SetPosition2(0.80,0.1);<br>
                        &nbsp;&nbsp;&nbsp; scalarBar-&gt;SetOrientationToHorizontal();<br>
                        <br>
                        &nbsp;&nbsp;&nbsp; // Create the graphics structure<br>
                        &nbsp;&nbsp;&nbsp; vtkRenderer *ren = vtkRenderer::New();<br>
                        &nbsp;&nbsp;&nbsp; vtkRenderWindow *renWin =
                        vtkRenderWindow::New();<br>
                        &nbsp;&nbsp;&nbsp; renWin-&gt;AddRenderer(ren);<br>
                        &nbsp;&nbsp;&nbsp; renWin-&gt;SetSize(600, 600);<br>
                        &nbsp;&nbsp;&nbsp; vtkRenderWindowInteractor *iren =
                        vtkRenderWindowInteractor::New();<br>
                        &nbsp;&nbsp;&nbsp; iren-&gt;SetRenderWindow(renWin);<br>
                        <br>
                        &nbsp;&nbsp;&nbsp; // Add the actors to the renderer, set the
                        background and size<br>
                        &nbsp;&nbsp;&nbsp; ren-&gt;AddActor(textActor);<br>
                        &nbsp;&nbsp;&nbsp; ren-&gt;AddActor(scalarBar);<br>
                        &nbsp;&nbsp;&nbsp; ren-&gt;SetBackground(0.1, 0.2, 0.4);<br>
                        &nbsp;&nbsp;&nbsp; ren-&gt;ResetCamera();<br>
                        &nbsp;&nbsp;&nbsp; ren-&gt;GetActiveCamera()-&gt;Zoom(1.0);<br>
                        &nbsp;&nbsp;&nbsp; renWin-&gt;Render();<br>
                        <br>
                        &nbsp;&nbsp;&nbsp; // Starts the event loop<br>
                        &nbsp;&nbsp;&nbsp; iren-&gt;Start();<br>
                        <br>
                        &nbsp;&nbsp;&nbsp; // Do some cleaning<br>
                        &nbsp;&nbsp;&nbsp; textActor-&gt;Delete();<br>
                        &nbsp;&nbsp;&nbsp; Lut-&gt;Delete();<br>
                        &nbsp;&nbsp;&nbsp; scalarBar-&gt;Delete();<br>
                        &nbsp;&nbsp;&nbsp; ren-&gt;Delete();<br>
                        &nbsp;&nbsp;&nbsp; renWin-&gt;Delete();<br>
                        &nbsp;&nbsp;&nbsp; iren-&gt;Delete();<br>
                        <br>
                        &nbsp;&nbsp;&nbsp; return 0;<br>
                        }<br>
                        <br>
                        _______________________________________________<br>
                        Powered by <a moz-do-not-send="true"
                          href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
                        <br>
                        Visit other Kitware open-source projects at <a
                          moz-do-not-send="true"
                          href="http://www.kitware.com/opensource/opensource.html"
                          target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
                        <br>
                        Please keep messages on-topic and check the VTK
                        FAQ at: <a moz-do-not-send="true"
                          href="http://www.vtk.org/Wiki/VTK_FAQ"
                          target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
                        <br>
                        Follow this link to subscribe/unsubscribe:<br>
                        <a moz-do-not-send="true"
                          href="http://www.vtk.org/mailman/listinfo/vtkusers"
                          target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
                        <br>
                      </blockquote>
                    </div>
                    <br>
                  </div>
                </blockquote>
                <br>
              </div>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
    </blockquote>
    <br>
  </body>
</html>