|
From: m s. <mw...@us...> - 2006-12-18 04:14:20
|
> ----- Original Message -----
> From: "Ethan A Merritt" <merritt@u.washington.edu>
> To: gnu...@li..., mw...@us...
> Subject: Re: Splot map and gd.trm bugs (long)
> Date: Sat, 16 Dec 2006 15:48:07 -0800
>=20
>=20
> > I have done some digging through the code and found a couple of
> > issues. First, gd.trm has two differing variables for storing
> > character size information: term->[vh]_char and png_state.char[wh].
> > These are often set to each other. However, when finding approximate
> > TTF font info the png_state.char[wh] variables were not being set. A
> > quick fix is to always set png_state.char[wh] when the TTF font info
> > is determined.
>=20
> Did you find a specific place where this is not already being done?
>=20
Here is a little patch for gd.trm to help keep the character info syncroniz=
ed.
Index: gd.trm
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/gnuplot/gnuplot/term/gd.trm,v
retrieving revision 1.100
diff -u -r1.100 gd.trm
--- gd.trm 9 Dec 2006 19:32:44 -0000 1.100
+++ gd.trm 18 Dec 2006 04:09:42 -0000
@@ -941,6 +941,8 @@
if (!err) {
term->h_char =3D .11 * (float)(brect[2] - brect[0]) + 0.5;
term->v_char =3D 1.1 * (float)(brect[1] - brect[7]) + 0.5;
+ png_state.charw=3Dterm->h_char;
+ png_state.charh=3Dterm->v_char;
}
}
#endif
@@ -1741,6 +1743,8 @@
if (!err) {
term->h_char =3D .11 * (float)(brect[2] - brect[0]) + 0.5;
term->v_char =3D 1.1 * (float)(brect[1] - brect[7]) + 0.5;
+ png_state.charw=3Dterm->h_char;
+ png_state.charh=3Dterm->v_char;
}
}
#endif
--=20
Search for products and services at:=20
http://search.mail.com
|