GRASS GIS 7 Programmer's Manual  7.9.dev(2021)-e5379bbd7
font_freetype.c
Go to the documentation of this file.
1 #include <stdlib.h>
2 #include <string.h>
3 #include <grass/gis.h>
4 #include "driverlib.h"
5 
6 static char *filename;
7 static int font_index;
8 
9 int font_init_freetype(const char *name, int index)
10 {
11  if (filename)
12  G_free(filename);
13  filename = G_store(name);
14 
15  font_index = index;
16 
17  return 0;
18 }
19 
20 const char *font_get_freetype_name(void)
21 {
22  return filename;
23 }
24 
25 int font_get_index(void)
26 {
27  return font_index;
28 }
const char * font_get_freetype_name(void)
Definition: font_freetype.c:20
void G_free(void *)
Free allocated memory.
Definition: gis/alloc.c:149
int font_init_freetype(const char *name, int index)
Definition: font_freetype.c:9
int font_get_index(void)
Definition: font_freetype.c:25
char * G_store(const char *)
Copy string to allocated memory.
Definition: strings.c:87
const char * name
Definition: named_colr.c:7