* Exposing load_user_fonts() and some other font.c functions,
even when FORKED_FONTS is not set. * No longer undef'ing SDL_thread stuff when FORKED_FONTS is used if we're ALSO not using SDL_Pango, since that now uses a thread to let fontconfig generate its cache, and still let Tux Paint be responsive to the OS and user. (SF.net bug #2944951) * Spawning a thread and rendering a dummy string with SDL_Pango, to allow fontconfig to generate its cache. (SF.net bug #2944951) * Setting up 'busy' mouse cursor (watch-shaped) earlier (so it can happen while fontconfig cache thread runs). * Not spawning forked font scanner (FORKED_FONTS) as early, so fontconfig can generate its cache first. (I wasn't sure if calling an SDL_thread after a fork() occured was safe or not; admittedly, I discovered that SDL_thread spawning wasn't working due to the re-#defines of those functions when FORKED_FONTS was set; see above.) All of this only tested on Ubuntu 9.04. Forced disabling of FORKED_FONTS by editing fonts.h, and Tux Paint still worked (it just took longer at the splash screen while the fonts were loaded). Needs testing on various Windows, Mac OS X and BeOS.
This commit is contained in:
parent
0c63f14092
commit
be2b5537b3
5 changed files with 196 additions and 66 deletions
|
|
@ -428,6 +428,7 @@ static void reliable_read(int fd, void *buf, size_t count)
|
|||
while (count);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static void groupfonts_range(style_info ** base, int count)
|
||||
{
|
||||
|
|
@ -931,7 +932,7 @@ static void loadfonts(SDL_Surface * screen, const char *const dir)
|
|||
}
|
||||
|
||||
|
||||
static int load_user_fonts(SDL_Surface * screen, void *vp, const char *restrict const locale)
|
||||
/* static */ int load_user_fonts(SDL_Surface * screen, void *vp, const char *restrict const locale)
|
||||
{
|
||||
char *homedirdir;
|
||||
|
||||
|
|
@ -991,7 +992,7 @@ static int load_user_fonts(SDL_Surface * screen, void *vp, const char *restrict
|
|||
}
|
||||
|
||||
|
||||
|
||||
#ifdef FORKED_FONTS
|
||||
|
||||
void run_font_scanner(SDL_Surface * screen, const char *restrict const locale)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue