[GRASS-user] Horizontal legend font size
Moritz Lennert
mlennert at club.worldonline.be
Wed Aug 13 04:04:33 EDT 2008
On 13/08/08 09:42, Hamish wrote:
> Paul Moen wrote:
>> How can I change the size of the text in the legend?
>
> you need to recompile d.legend with the following patch:
>
> Index: display/d.legend/main.c
> ===================================================================
> --- display/d.legend/main.c (revision 32734)
> +++ display/d.legend/main.c (working copy)
> @@ -672,7 +672,7 @@
> if (!horiz)
> txsiz = (int)((y1 - y0) / 20);
> else
> - txsiz = (int)((x1 - x0) / 20);
> + txsiz = (int)((x1 - x0) / 25);
>
> /* scale text to fit in window if position not manually set */
> /* usually not needed, except when frame is really narrow */
>
>
> adjust the divisor to suit. The above patch makes the font super tiny
> for legends which are around 2-3 inches wide, so I am loathe to apply
> it in SVN. Maybe it would be better to make textsize it a fn of width^2
> so the rate of change was not so dramatic.
How about making font and fontsize parameters of d.legend, so that the
user can adjust ?
Moritz
More information about the grass-user
mailing list