28 if (!dir.has_value()) {
30 "%s: 'fonts' data path not found for '%s', will not be able to display text\n",
37 BLI_path_join(filepath,
sizeof(filepath), dir->c_str(), filename);
61 if (!path.has_value()) {
62 fprintf(stderr,
"Font data directory \"%s\" could not be detected!\n", datafiles_fonts_dir);
68 for (
int i = 0; i < file_list_num; i++) {
69 if (
S_ISDIR(file_list[i].s.st_mode)) {
73 const char *filepath = file_list[i].
path;
84 fprintf(stderr,
"Unable to load font: %s\n", filepath);
std::optional< std::string > BKE_appdir_folder_id(int folder_id, const char *subfolder) ATTR_WARN_UNUSED_RESULT
#define BLF_DEFAULT_PROPORTIONAL_FONT
#define BLF_DATAFILES_FONTS_DIR
int BLF_load(const char *filepath) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLF_load_unique(const char *filepath) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int bool BLF_is_loaded(const char *filepath) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLF_enable(int fontid, int option)
#define BLF_DEFAULT_MONOSPACED_FONT
File and directory operations.
unsigned int BLI_filelist_dir_contents(const char *dirname, struct direntry **r_filelist)
void BLI_filelist_free(struct direntry *filelist, unsigned int nrentries)
#define BLI_path_join(...)
bool BLI_path_extension_check_n(const char *path,...) ATTR_NONNULL(1) ATTR_SENTINEL(0)
Compatibility-like things for windows.
static int blf_load_font_default(const char *filename, const bool unique)
static void blf_load_datafiles_dir()
int BLF_load_mono_default(const bool unique)
void BLF_load_font_stack()
int BLF_load_default(const bool unique)