|
From: Ethan M. <merritt@u.washington.edu> - 2006-04-04 20:06:33
|
On Tuesday 04 April 2006 12:25 pm, Bastian Maerkisch wrote: > > > >> The usual enhanced_recursion calls will need feedback about the text > >> layout size from the terminal driver. > > > For instance, the postscript driver itself knows little about text > > layout. That information is not available until much later, when > > the output file is run through a postscript interpreter > > (e.g. a PostScript printer, ghostscript). By then it is far to late > > to feed any information back to the gnuplot core routines. > A quick look at gd.trm reveals the following piece of code in ENHGD_put_text(): > > /* EAM - Software text justification requires two passes */ > if (png_state.justify == RIGHT || png_state.justify == CENTRE) > ENHgd_sizeonly = TRUE; > > So for most terminals you really need a way to get feedback about the text layout > size. I'm not sure we're all three of us on the same page here. It may be that I misunderstood the original question. The terminal driver itself may need to track such information internally in order to implement enhanced text. That is certainly true. But I thought Chris's question was whether a driver was obligated to pass such information back to the core code. The answer to that one is 'no'. It would be nice if the core routines *could* ask a driver for specific details, but unfortunately this doesn't work in general. PostScript is a major example, but it is also true for svg and x11. [OK, x11 could be made to work that way but it would probably require a new set of pipes between gnuplot and gnuplot_x11. I did consider doing this at one point, but decided it was too much work for too little gain.] -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle WA |