[GRASS-dev] d.font -l: please sort alphabetically
Glynn Clements
glynn at gclements.plus.com
Thu Jul 26 17:14:08 EDT 2007
Markus Neteler wrote:
> >> I have tried but both -l and -L don't report anything (any more).
> >
> >> I didn't run "make distclean" if that matters.
> >
> > It matters.
> >
> > The architecture of the graphics subsystem is such that adding new
> > operations invariably requires substantial re-compilation. Unless
> > you're especially familiar[1] with the graphics subsystem, it's easier
> > to just start from scratch with "make distclean" than to figure out
> > what needs to be re-compiled.
> >
> > [1] Actually, even if you are familiar, it's easy to get bitten. I
> > spent 10 minutes tracking down a problem caused by failing to run
> > "make -C lib headers" (which copies include/* to dist.<arch>/include)
> > after modifying include/graphics.h.
>
> Also after full recompile, nothing yet. I am working on 64bit boxes
> (RHEL4 and Mandriva2007.1).
>
> Ah, found it through re-debugging!
>
> static void read_freetype_fonts(int verbose)
> {
> char **list;
> int count;
> int i;
>
> R__open_quiet();
> if (R_open_driver() != 0)
> return;
>
> If the GRASS monitor isn't open, it silently exits at R_open_driver().
> Maybe it should say that a monitor must be open (would be nice of course
> to get it working also without monitor, but probably not possible?).
Not possible.
As part of the recent font changes (merging the handling of stroke and
freetype fonts), listing of fonts was moved from the client to the
driver. This means that you don't need fontcap-parsing code in both
the client and the driver; it also allows for the possibility of
driver-specific handling (e.g. the PS driver allowing the use of
PostScript fonts).
The use of R__open_quiet() is presumably a remnant of the time when
d.font parsed the freetypecap file itself. It should just be removed,
so that R_open_driver() generates warnings if no monitor is selected
or running.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list