11 static void stroke_set(
const char *filename)
17 static void freetype_set(
const char *filename,
int index)
23 static void driver_set(
const char *
name)
37 encoding =
G_store(
"ISO-8859-1");
41 static void font_list(
char ***
list,
int *
count,
int verbose)
51 G_debug(2,
"font_list: num_fonts=%d", num_fonts);
52 fonts =
G_malloc(num_fonts *
sizeof(
const char *));
54 for (i = 0; i < num_fonts; i++) {
61 sprintf(buf,
"%s|%s|%d|%s|%d|%s|",
75 static void free_font_list(
char **fonts,
int count)
79 for (i = 0; i <
count; i++)
91 freetype_set(name, 0);
98 if (strcmp(name, cap->
name) != 0)
107 stroke_set(cap->
name);
120 for (i = 0; i <
count; i++) {
129 driver_set(cap.
name);
134 free_font_list(list, count);
138 stroke_set(
"romans");
151 font_list(list, count, 0);
158 font_list(list, count, 1);
int font_exists(const char *)
Check if font exists.
int font_init(const char *)
void G_free(void *)
Free allocated memory.
const char * font_get_encoding(void)
void COM_Font_list(char ***list, int *count)
void COM_Set_encoding(const char *enc)
int font_init_freetype(const char *, int)
void COM_Font_info(char ***list, int *count)
void(* Font_list)(char ***, int *)
void COM_Set_font(const char *name)
void(* Font_info)(char ***, int *)
int parse_fontcap_entry(struct GFONT_CAP *, const char *)
Parse fontcap entry.
char * G_store(const char *)
Copy string to allocated memory.
void(* Set_font)(const char *)
int G_debug(int, const char *,...) __attribute__((format(printf
int G_is_absolute_path(const char *)
Checks if a specified path looks like an absolute path on the host system.