From: <ai...@us...> - 2011-06-22 00:47:04
|
Revision: 11778 http://plplot.svn.sourceforge.net/plplot/?rev=11778&view=rev Author: airwin Date: 2011-06-22 00:46:58 +0000 (Wed, 22 Jun 2011) Log Message: ----------- Better tuning of superscript/subscript offsets to match algorithm used for plstr code in plsym.c that is used for Hershey fonts (e.g., -dev xwin). However, there are still at least two superscript/subscript bugs for the cairo devices. 1. test_superscript_subscript.py results show that the vertical offsets for superscripts with -dev xcairo largely match those from -dev xwin. This is expected because it was those offsets I used to tune the cairo device driver. However, the subscript vertical offsets are slightly too large in magnitude, i.e., the subscript is placed too low compared to the corresponding superscript. Off by 1 error for subscripts? 2. The plbox axis exponents that occur for badly scaled axis coordinates are written using plmtex. I mimic those plmtex calls with test_superscript_subscript.py. As expected, the exponent strings from plbox and test_superscript_subscript.py with -dev xwin have the same vertical offsets. However, the -dev xcairo results for the two cases are quite different with the plbox result having much too large a vertical offset for the superscript. Starting superscript offset level is off by 1 for plbox? Modified Paths: -------------- trunk/drivers/cairo.c Modified: trunk/drivers/cairo.c =================================================================== --- trunk/drivers/cairo.c 2011-06-22 00:26:12 UTC (rev 11777) +++ trunk/drivers/cairo.c 2011-06-22 00:46:58 UTC (rev 11778) @@ -1137,7 +1137,7 @@ // Create a rise span tag w/ appropriate font size & baseline offset //-------------------------------------------------------------------------- -#define STEPSIZE 7500.0 +#define STEPSIZE 15000.0 char *rise_span_tag( int level, int direction ) { @@ -1148,7 +1148,7 @@ for ( i = 0; i < abs( level ); i++ ) { - multiplier = multiplier * 0.9; + multiplier = multiplier * 0.75; rise += STEPSIZE * multiplier; } if ( direction > 0 ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |