I just committed a change to the v.label.sa module which adds support
for using fonts in the fontcap. I would have wanted to use standard
GRASS functions for parsing the fontcap, but since it is placed in the
display driver library it means to do that I'd require an open monitor.
This seems a bit silly to me. I mean other things might want to use the
fontcap without needing the overhead of a display. I wonder would it be
possible to move the fontcap stuff to gislib?
--Wolf
PS. Next up will be support for colors in v.label.sa.
I just committed a change to the v.label.sa module which adds support
for using fonts in the fontcap. I would have wanted to use standard
GRASS functions for parsing the fontcap, but since it is placed in the
display driver library it means to do that I'd require an open monitor.
This seems a bit silly to me. I mean other things might want to use the
fontcap without needing the overhead of a display. I wonder would it be
possible to move the fontcap stuff to gislib?
Nope.
The only thing that you can do with the font names returned by
R_font_list() is to pass them to R_font(). If you don't have a
monitor, you have no use for the font list.
The reason why the code is in the driver library is because the set of
available fonts is allowed to depend upon the driver. E.g. the
PostScript driver could return the built-in PostScript fonts, the X
driver could return fonts which are available on the X display, etc.
The only thing that you can do with the font names returned by
R_font_list() is to pass them to R_font(). If you don't have a
monitor, you have no use for the font list.
But I do, since I can get the path to the font from that list, which
happens to be what I'm interested in. I can live with my current way of
having copied some fontcap parsing stuff from the library, as long as
the fontcap doesn't change to much ;).