46 if (sscanf(str,
"%[^|]|%[^|]|%d|%[^|]|%d|%[^|]|",
name, longname, &type,
47 path, &index, encoding) == 6) {
52 else if (sscanf(str,
"%[^|]|%[^|]|%d||%d|%[^|]|",
name, longname, &type,
53 &index, encoding) == 5)
82 if ((capfile = getenv(
"GRASS_FONT_CAP"))) {
83 if ((fp = fopen(capfile,
"r")) ==
NULL)
85 _(
"%s: Unable to read font definition file; use the default"),
95 while (fgets(buf,
sizeof(buf), fp) && !feof(fp)) {
108 fonts[fonts_count++] = cap;
void G_free(void *)
Free allocated memory.
void G_warning(const char *,...) __attribute__((format(printf
const char * G_gisbase(void)
Get full path name of the top level module directory.
char * G_store(const char *)
Copy string to allocated memory.
int font_exists(const char *name)
Check if font exists.
void free_fontcap(struct GFONT_CAP *ftcap)
Free allocated GFONT_CAP structure.
struct GFONT_CAP * parse_fontcap(void)
Parse fontcaps.
int parse_fontcap_entry(struct GFONT_CAP *e, const char *str)
Parse fontcap entry.