Fwd: [GRASS-dev] d.histogram: font issue

Glynn Clements glynn at gclements.plus.com
Thu Jan 31 06:30:43 EST 2008


Michael Barton wrote:

> >> Now I see why the letters are all squished together. This happens if
> >> the region is roughly square or especially if it is taller than it is
> >> wide. If the region is considerably wider than it is tall (e.g. 3:2)
> >> the letters look OK. It looks like it is using the region height to
> >> specify the typeface point size, and the region width to specify the
> >> leading or horizontal character spacing. It should probably use the
> >> width only for character point size.

Most programs which specify text size specify a fixed aspect ratio,
typically identical values for both width and height (although some
modules use a different fixed ratio)

However, d.graph, d.histogram, d.linegraph, and d.mapgraph make the
text size proportional to the screen size, so the text's aspect ratio
will depend upon the screen's aspect ratio.

d.profile sometimes uses a fixed aspect ratio and sometimes matches
the screen's aspect ratio. r.spread squashes text to fit various boxes
which vary according to the screen dimensions.

In most cases, a fixed aspect ratio is desirable. I'll probably
enforce this in 7.x by only allowing a single "size" parameter for the
text size rather than separate width/height.

> > I support using some Python plotting library to draw axes. We could  
> > write
> > up a grid template using d.graph, but I'd rather be in the business of
> > gluing together high quality components rather than reinventing
> > yet-another x-y plotting package. If we like a plotting package but  
> > it lacks the ability to output to PNG or whatever we need, I would  
> > suggest donating the extra code to enhance that package to the  
> > other project.

If the functionality is useful enough to have in GRASS, it's useful
enough to have outside of the GUI.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list