mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-18 12:05:14 -04:00
fix some system fonts missing from list on OSX
This commit is contained in:
parent
56a4664f22
commit
17b838eba1
@ -277,7 +277,7 @@ static void Http_SysFree(void) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef CC_BUILD_POSIX
|
#ifdef CC_BUILD_POSIX
|
||||||
CURL* curl;
|
static CURL* curl;
|
||||||
|
|
||||||
static void Http_SysInit(void) {
|
static void Http_SysInit(void) {
|
||||||
CURLcode res = curl_global_init(CURL_GLOBAL_DEFAULT);
|
CURLcode res = curl_global_init(CURL_GLOBAL_DEFAULT);
|
||||||
|
@ -1266,22 +1266,25 @@ static void* FT_ReallocWrapper(FT_Memory memory, long cur_size, long new_size, v
|
|||||||
#define FONT_CACHE_FILE "fontscache.txt"
|
#define FONT_CACHE_FILE "fontscache.txt"
|
||||||
static void Font_Init(void) {
|
static void Font_Init(void) {
|
||||||
#ifdef CC_BUILD_WIN
|
#ifdef CC_BUILD_WIN
|
||||||
const static String dir = String_FromConst("C:\\Windows\\Fonts");
|
const static String dirs[1] = {
|
||||||
|
String_FromConst("C:\\Windows\\Fonts")
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
#ifdef CC_BUILD_LINUX
|
#if defined CC_BUILD_LINUX || defined CC_BUILD_BSD || defined CC_BUILD_SOLARIS
|
||||||
const static String dir = String_FromConst("/usr/share/fonts");
|
const static String dirs[2] = {
|
||||||
#endif
|
String_FromConst("/usr/share/fonts"),
|
||||||
#ifdef CC_BUILD_BSD
|
String_FromConst("/usr/local/share/fonts")
|
||||||
const static String dir = String_FromConst("/usr/local/share/fonts");
|
};
|
||||||
#endif
|
|
||||||
#ifdef CC_BUILD_SOLARIS
|
|
||||||
const static String dir = String_FromConst("/usr/share/fonts");
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef CC_BUILD_OSX
|
#ifdef CC_BUILD_OSX
|
||||||
const static String dir = String_FromConst("/Library/Fonts");
|
const static String dirs[2] = {
|
||||||
|
String_FromConst("/System/Library/Fonts"),
|
||||||
|
String_FromConst("/Library/Fonts")
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
const static String cachePath = String_FromConst(FONT_CACHE_FILE);
|
const static String cachePath = String_FromConst(FONT_CACHE_FILE);
|
||||||
FT_Error err;
|
FT_Error err;
|
||||||
|
int i;
|
||||||
|
|
||||||
ft_mem.alloc = FT_AllocWrapper;
|
ft_mem.alloc = FT_AllocWrapper;
|
||||||
ft_mem.free = FT_FreeWrapper;
|
ft_mem.free = FT_FreeWrapper;
|
||||||
@ -1298,7 +1301,9 @@ static void Font_Init(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
EntryList_Init(&font_list, NULL, FONT_CACHE_FILE, '=');
|
EntryList_Init(&font_list, NULL, FONT_CACHE_FILE, '=');
|
||||||
Directory_Enum(&dir, NULL, Font_DirCallback);
|
for (i = 0; i < Array_Elems(dirs); i++) {
|
||||||
|
Directory_Enum(&dirs[i], NULL, Font_DirCallback);
|
||||||
|
}
|
||||||
if (font_list_changed) EntryList_Save(&font_list);
|
if (font_list_changed) EntryList_Save(&font_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user