|
From: m s. <mw...@us...> - 2006-12-21 22:50:01
|
> ----- Original Message ----- > From: "Ethan A Merritt" <merritt@u.washington.edu> > To: "m sutton" <mw...@us...> > Subject: Re: Splot map and gd.trm bugs (long) > Date: Sun, 17 Dec 2006 20:44:59 -0800 >=20 >=20 > On Sunday 17 December 2006 20:12, m sutton wrote: > > > > Did you find a specific place where this is not already being done? > > > Here is a little patch for gd.trm to help keep the character=20 > > info syncronized. >=20 > Do you have an actual demo bug that this patch fixes? > I don't follow why these changes necessary or desirable. > No text has been printed by either of the code segments you are > modifying, so I don't see why it is correct to update the variables > holding the last font used. After all, the font could easily > change again before the next text is printed. Setting the font > is different from writing a string. >=20 The change is needed because PNG_put_text uses png_state.charh to compute t= he position of text. The effect of this is most noticeable when using a fo= nt different from the font used with 'set term png'. The example below use= s TTF fonts. I have used sized to exaggerate the problem. The label shoul= d be centered vertically at 0. Without the fix the bottom of the label is = just a hair below zero. Below is my test script. ------ set term x11 persist set style line 98 lt 1 lw 1 lc rgb 'magenta' set style line 99 lt -1 lw 3 lc rgb 'cyan' set grid back ls 98 unset key set xr [-60:60] set yr [-60:60] set border front ls 99 png =3D 1 if (png > 0) set term png tiny truecolor butt nocrop size 500,500 if (png >0) set out 'plot-gd-font.png' if (png < 1) set term x11 2 set title "2D PLOT" font "luxirr,8" set lab 1 "MY LABELXXXXXXXXX" at 0,0 center font "luxirr,24" offset 0,0 fro= nt=20 plot '-' w p pt 5 ps 1 0 -20 e --=20 ___________________________________________________ Search for products and services at: http://search.mail.com |