Blender
V3.3
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ft2build.h>
#include "MEM_guardedalloc.h"
#include "DNA_vec_types.h"
#include "BLI_fileops.h"
#include "BLI_listbase.h"
#include "BLI_path_util.h"
#include "BLI_string.h"
#include "BLI_threads.h"
#include "BLI_utildefines.h"
#include "BLF_api.h"
#include "blf_internal.h"
#include "blf_internal_types.h"
Go to the source code of this file.
Functions | |
static DirBLF * | blf_dir_find (const char *path) |
void | BLF_dir_add (const char *path) |
void | BLF_dir_rem (const char *path) |
char ** | BLF_dir_get (int *ndir) |
void | BLF_dir_free (char **dirs, int count) |
char * | blf_dir_search (const char *file) |
char * | blf_dir_metrics_search (const char *filepath) |
Variables | |
static ListBase | global_font_dir = {NULL, NULL} |
Manage search paths for font files.
Definition in file blf_dir.c.
void BLF_dir_add | ( | const char * | path | ) |
Add a path to the font dir paths.
Definition at line 50 of file blf_dir.c.
References blf_dir_find(), BLI_addhead(), BLI_strdup(), global_font_dir, MEM_callocN, and DirBLF::path.
|
static |
Definition at line 36 of file blf_dir.c.
References BLI_path_cmp, ListBase::first, global_font_dir, DirBLF::next, NULL, and DirBLF::path.
Referenced by BLF_dir_add(), and BLF_dir_rem().
void BLF_dir_free | ( | char ** | dirs, |
int | count | ||
) |
Free the data return by BLF_dir_get.
char** BLF_dir_get | ( | int * | ndir | ) |
Return an array with all the font dir (this can be used for file-selector).
Definition at line 76 of file blf_dir.c.
References BLI_listbase_count(), BLI_strdup(), count, ListBase::first, global_font_dir, MEM_callocN, DirBLF::next, NULL, and DirBLF::path.
char* blf_dir_metrics_search | ( | const char * | filepath | ) |
Some font have additional file with metrics information, in general, the extension of the file is: .afm
or .pfm
Definition at line 135 of file blf_dir.c.
References BLI_exists(), BLI_strdup(), BLI_strnlen(), MEM_freeN, and NULL.
Referenced by blf_font_new().
void BLF_dir_rem | ( | const char * | path | ) |
Remove a path from the font dir paths.
Definition at line 64 of file blf_dir.c.
References blf_dir_find(), BLI_remlink(), global_font_dir, MEM_freeN, and DirBLF::path.
char* blf_dir_search | ( | const char * | file | ) |
Definition at line 109 of file blf_dir.c.
References BLI_assert_msg, BLI_exists(), BLI_join_dirfile(), BLI_path_is_rel(), BLI_strdup(), file, FILE_MAX, ListBase::first, global_font_dir, DirBLF::next, NULL, and DirBLF::path.
Referenced by BLF_load_unique().
Definition at line 34 of file blf_dir.c.
Referenced by BLF_dir_add(), blf_dir_find(), BLF_dir_get(), BLF_dir_rem(), and blf_dir_search().