|
From: Ethan M. <merritt@u.washington.edu> - 2009-09-10 19:11:54
|
On Thursday 10 September 2009 11:38:09 Allin Cottrell wrote: > On Wed, 9 Sep 2009, Ethan Merritt wrote: > > I don't see anything immediately in looking at the code. > > It really is initialized to 6, but after that it seems to just pass > > through any request to the cairo library. > > Ah, in cairo.trm we have two alternative default initializations, > CAIROPDF_PARAMS_DEFAULT and CAIROPNG_PARAMS_DEFAULT; the former > specifies a 6-point font and the latter specifies 12-point. Guess I missed that in my quick look. > What's to be done? One option would be to multiply the user's > font size specification by 2 in the case of pngcairo, to make it > consistent with the "6 point" default. That is, if I say > > set term pngcairo font "foo,8" > > the actual size sent to the driver is 16. > > The alternative would be to amend the doc for pngcairo to say that > the default is 12 points. This has the advantage that it doesn't > change the output of existing gnuplot scripts, but the > disadvantage that it ratifies the situation where you have to > apply a factor of 2 to the font size if you want comparable output > from pdfcairo and pngcairo (in the case where you're not just > accepting the default size). The issue is more general that just comparing pdfcairo and pngcairo. For instance, 'set term post' defaults to 7x10" output, but 'set term post eps' defaults to half of that: 3.5"x5". Yet they both claim to have the same default font size. My inclination is to add a "fontscale" option for all terminal drivers, analogous to the "linewidth" and "dashlength" terminal options. Like these, it would be interpreted as "whatever font size was requested, multiply it by this scale factor before using it". Then the font sizes mentioned explicitly in a script could be used without change, so long as you added an appropriate scaling factor in the 'set term' command. Ethan -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle 98195-7742 |