GRASS GIS 8 Programmer's Manual 8.4.1(2025)-45ca3179ab
Loading...
Searching...
No Matches
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
6static char *filename;
7static int font_index;
8
9int 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
20const char *font_get_freetype_name(void)
21{
22 return filename;
23}
24
26{
27 return font_index;
28}
void G_free(void *buf)
Free allocated memory.
Definition alloc.c:150
int font_init_freetype(const char *name, int index)
const char * font_get_freetype_name(void)
int font_get_index(void)
const char * name
Definition named_colr.c:6
char * G_store(const char *s)
Copy string to allocated memory.
Definition strings.c:87