2009/9/1 Jae-Joon Lee <lee.j.j...@gmail.com>:
> My understanding is that all the backends should use left-bottom
> alignment. Text alignment in matplotlib is handled by mpl itself (not
> by the backend), and for this to work, you have to define
> get_text_width_height_descent method correctly.
>
> The real question is how we know the metric of the font that will be
> used for rendering. I have little knowledge about the html canvas
> specification, but I presume that the situation is very similar to the
> svg case. Unless we embed the fonts (the svg backend has an option to
> embed the fonts as paths), I don't think it is possible to get it
> right.

I see firefox 3.5 (html5) has a method to measure the width of the
text, I'll look at using this in a javascript function to render the
text.

 https://developer.mozilla.org/en/Drawing_text_using_a_canvas#measureText%28%29

>
> ps. gnuplot seems to use embedded fonts for their html5 canvas backend
> (I haven't checked carefully but their demo output uses canvastext.js,
> originally from  http://jim.studt.net/canvastext/)

yep noticed that, but didn't realize the significance of not using the
built in canvas text drawing.

Thanks, Michael

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to