|
From: sfeam (E. Merritt) <eam...@gm...> - 2012-10-12 15:40:54
|
On Friday, 12 October 2012, Daniel J Sebald wrote: > > Counting capitals would be a good first step. Since this is a once per > > plot overhead, some detailed accounting would not have any noticeable > > performance hit. > > Counting capitals goes along the lines one doesn't want to go. The > proper way of doing this is either to have scalable fonts, or for the > library to have a convenient function by which the programmer can > provide the font type/size and an ASCII string of the text to be placed > and the routine returns the size when rendered. Font substitution is a > get-what-you-get sort of thing. The fonts are scalable. That's not the problem. There are routines that return font metrics, but in order for it to make any sense they must be called by (or at least in the same context as) the program that is displaying the result. Calling such a library from inside gnuplot would at best only an approximation based on rendering some other font in some other environment. pl...@pi... wrote> > The nice thing about SVG is the ability to zoom in to get more detail. > Doing this on Allin's example , comparing Firefox to Opera on linux, > the U of UNEMP is basically outside the plot with the second upright on > the y-axis. > > With Opera is it perfectly coincident this the y axis, on FF it is just > inside the graph with a very fine amount of white separating it from the > axis. > > A more exacting test case could provide some useful metrics on the problem. But how would that help? Aren't you illustrating that the _same file_ produces different results when displayed by different viewing programs? I have found one ray of hope, however. There is a project called @font-face <http://www.font-face.com/> that attempts to define a mechanism for achieving cross-browser consistency in font display. I haven't had time to look into it seriously, but at first glance it seems like it might be a way to upgrade gnuplot's text handling for web display via the canvas terminal. I don't know whether it is relevant to SVG, however. If someone wants to look into it more deeply, that would be great. Ethan |