From: John H. <jd...@gm...> - 2007-06-05 16:43:50
|
On 6/5/07, John Hunter <jd...@gm...> wrote: > I worked on this some time ago, I never got to the point where I > thought it was ready for production but it is close. There is a > problem if usetex is enabled, because partial tex strings will cause > errors. But you can use it with regular text or plain text. Typo: "plain text" was meant to be "math text" Now I remember what really bothered me about this widget, and it wasn't just the usetex problem. The problem is that mpl has three different vertical alignment methods for text: top, bottom and center. None of them are right for a text box: you want baseline. Try typing "thinking" into the text box and watch what happens when you add and remove the "g". We do need to support baseline alignment for text, so if someone has an interest in adding this it would be a very useful feature, not just for a text box for for text alignment (eg tick labels) in general. See the image of the "g" at http://freetype.sourceforge.net/freetype2/docs/glyphs/glyphs-3.html for a visual representation -- hwat I am calling the "baseline" they refer to as the "origin" in that graph. Our default alignment should be "origin" or "baseline" but we don't have support for that. JDH |