TT font listing for beos

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@425 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Adrien Destugues 2008-12-27 14:37:47 +00:00
parent f180b13f29
commit c4955dd0f0

27
texte.c
View File

@ -294,11 +294,10 @@ void Initialisation_Texte(void)
} }
} }
#endif #endif
#elif defined(__linux__) #elif defined(__macosx__)
// Récupération de la liste des fonts avec fontconfig // Récupération de la liste des fonts avec fontconfig
#ifndef NOTTF #ifndef NOTTF
#ifdef __macosx__
int i,number; int i,number;
char home_dir[MAXPATHLEN]; char home_dir[MAXPATHLEN];
@ -317,26 +316,28 @@ void Initialisation_Texte(void)
for_each_file(*(font_path_list+i),Ajout_fonte); for_each_file(*(font_path_list+i),Ajout_fonte);
CFRelease(url); CFRelease(url);
#endif
#else #elif defined(__linux__)
#define USE_XLIB #define USE_XLIB
#ifdef USE_XLIB #ifdef USE_XLIB
{ {
int i,number; int i,number;
Display* dpy = XOpenDisplay(NULL); Display* dpy = XOpenDisplay(NULL);
char** font_path_list = XGetFontPath(dpy,&number); char** font_path_list = XGetFontPath(dpy,&number);
for(i=0;i<number;i++) for(i=0;i<number;i++)
for_each_file(*(font_path_list+i),Ajout_fonte); for_each_file(*(font_path_list+i),Ajout_fonte);
XFreeFontPath(font_path_list); XFreeFontPath(font_path_list);
} }
#endif #endif
#elif defined(__BEOS__)
#ifndef NOTTF
for_each_file("/etc/fonts/ttfonts", Ajout_fonte);
#endif #endif
#endif
#endif #endif
} }