From: Manfred S. <man...@gm...> - 2009-02-24 10:09:54
|
-------- Original-Nachricht -------- > Datum: Mon, 23 Feb 2009 13:48:11 -0800 > Von: Ethan Merritt <merritt@u.washington.edu> > An: "Manfred Schwarb" <man...@gm...> > CC: gnu...@li... > Betreff: Re: png: selecting builtin font impossible? > On Monday 23 February 2009 08:38:40 Manfred Schwarb wrote: > > > > > On Monday 23 February 2009, Manfred Schwarb wrote: > > > > > > > > > > > > > > > > Before 20080916, I get angle=90, TEXT_VERTICAL=90 for > > > > the vertical label in my example and therefore we get into the > > > > first case: x += t->v_char; > > > > > > > > After this date, I get angle=0, TEXT_VERTICAL=-270, and > > > > we fall into case 3: y -= t->v_char; > > > > > > What terminal are you using, that seems to think an angle of > > > -270 is different from an angle of 90? The ones I have tested > > > here do not seem to have any problem with it. > > > > > > > I will stop tracing this issue now, I hope someone can > > > > pursue this some further. > > > > > > We'll need a simple script that demonstrates the bug, > > > and a note on which terminal type is affected. > > > > > > > Is the script I have added to an earlier email enough, or do you > > want me to reduce it some more? > > > > Terminal: as I stated, pngcairo is OK, I see this effect only > > with libgd ("set term png"). I did not test any other terminals. > > OK, considering only the png terminal (gd.trm) it seems there may > be a bug in some versions of libgd that causes the text alignment > to behave badly if the angular setting is outside the range > -180 < angle < 180. > > The following patch may improve things: > > --- gnuplot/term/gd.trm 2008-12-01 11:33:06.000000000 -0800 > +++ gnuplot-cvs/term/gd.trm 2009-02-23 13:38:40.000000000 -0800 > @@ -1672,6 +1677,8 @@ PNG_put_text(unsigned int x, unsigned in > TERM_PUBLIC int > PNG_text_angle(int ang) > { > + while (ang < -180) ang += 360; > + while (ang > 180) ang -= 360; > png_state.angle = ang; > return TRUE; > } > > Please let me know if that fixes your problem or not. Yes, this fixes it. Thanks, Manfred > > > -- > Ethan A Merritt -- Computer Bild Tarifsieger! GMX FreeDSL - Telefonanschluss + DSL für nur 17,95 ¿/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a |