diff options
author | wkendrick <wkendrick> | 2010-04-27 22:04:43 (GMT) |
---|---|---|
committer | wkendrick <wkendrick> | 2010-04-27 22:04:43 (GMT) |
commit | c1ca0a197b0db12bffc1eb388f4ed2081371b290 (patch) | |
tree | e8f368a25b09ed4dc409abb4a454c727e7c21cdf | |
parent | ec811ddcdc0fefa136519031603ea9d965195f71 (diff) |
* 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.
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | docs/CHANGES.txt | 69 | ||||
-rw-r--r-- | src/fonts.c | 7 | ||||
-rw-r--r-- | src/fonts.h | 9 | ||||
-rw-r--r-- | src/tuxpaint.c | 177 |
5 files changed, 199 insertions, 69 deletions
@@ -244,7 +244,8 @@ MOUSE_CFLAGS:=-Isrc/$(MOUSEDIR) -D$(CURSOR_SHAPES)_CURSOR_SHAPES # "make" with no arguments builds the program and man page from sources: # .PHONY: all -all: tuxpaint translations magic-plugins tp-magic-config thumb-starters +all: tuxpaint translations magic-plugins tp-magic-config +# thumb-starters @echo @echo "--------------------------------------------------------------" @echo @@ -416,9 +417,10 @@ install: install-bin install-data install-man install-doc \ install-magic-plugin-dev \ install-icon install-gettext install-im install-importscript \ install-default-config install-example-stamps \ - install-example-starters install-thumb-starters\ + install-example-starters \ install-bash-completion \ $(ARCH_INSTALL) +#install-thumb-starters @echo @echo "--------------------------------------------------------------" @echo diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index 23b63f8..a5dbd79 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -6,9 +6,9 @@ Copyright (c) 2002-2009 by Bill Kendrick and others bill@newbreedsoftware.com http://www.tuxpaint.org/ -$Id: CHANGES.txt,v 1.735 2010/04/24 20:20:19 perepujal Exp $ +$Id: CHANGES.txt,v 1.736 2010/04/27 22:04:44 wkendrick Exp $ -2009.April.24 (0.9.22) +2009.April.27 (0.9.22) * New Tools: ---------- * Label - A tool to add text to a drawing, which can be modified or @@ -21,7 +21,7 @@ $Id: CHANGES.txt,v 1.735 2010/04/24 20:20:19 perepujal Exp $ ---------------- * Blinds - Close window blinds over your picture. Perspective - Change the image's perspective. - Mosaic Hexagon, Mosaic irregular, Mosaic square - Glass mosaic effects. + Moasic Hexagon, Mosaic irregular, Mosaic square - Glass mosaic effects. Zoom - Zoom the image in or out. By Pere Pujal i Carabantes <pere@fornol.no-ip.org> @@ -45,6 +45,19 @@ $Id: CHANGES.txt,v 1.735 2010/04/24 20:20:19 perepujal Exp $ * Other Improvements: ------------------- + * Creating thumbnails for the starters we provide. + Pere Pujal i Carabantes <pere@fornol.no-ip.org> + + * On systems where Pango is used for UI text rendering, Tux Paint now + spawns a temporary thread during start-up (at the splash screen) to + allow "fontconfig" to generate its font cache in the background, + while showing the "please wait" animation, and responding to the US. + (Fontconfig takes a long time to generate its cache the first time + you run a Pango- and hence fontconfig-enabled application + (Tux Paint, Gimp, Inkscape, etc.), or after adding lots of new fonts + to your system). + SF.net Bug #2944951 + * Thumbnailing (of UI elements, stamps, saved images, etc.) is now gamma-corrected. See: http://www.4p8.com/eric.brasseur/gamma.html @@ -106,8 +119,6 @@ $Id: CHANGES.txt,v 1.735 2010/04/24 20:20:19 perepujal Exp $ * Creation of thumbnails for personal starters and templates. - * Creating thumbnails for the starters we provide. - * New Starters: ------------- * Elephant @@ -147,7 +158,7 @@ $Id: CHANGES.txt,v 1.735 2010/04/24 20:20:19 perepujal Exp $ * New Locales: ------------ * Luxembourgish translation - René Brandenburger <rene@brandenburger.lu> + Ren� Brandenburger <rene@brandenburger.lu> * Malayalam translation TBD @@ -156,7 +167,7 @@ $Id: CHANGES.txt,v 1.735 2010/04/24 20:20:19 perepujal Exp $ Farinaz Hedayat <farinaz.hedayat@gmail.com> * Venetian language - Fabio Lazarin, El Galepìn <mistro@elgalepin.com> + Fabio Lazarin, El Galep�n <mistro@elgalepin.com> * Localization Updates: --------------------- @@ -375,7 +386,7 @@ $Id: CHANGES.txt,v 1.735 2010/04/24 20:20:19 perepujal Exp $ * New localizations: ------------------ - * Shuswap (Secwepemctín) translation + * Shuswap (Secwepemct�n) translation Neskie Manuel <neskiem@gmail.com> * Songhay translation @@ -444,7 +455,7 @@ $Id: CHANGES.txt,v 1.735 2010/04/24 20:20:19 perepujal Exp $ Simona Riva <simona.riva@tiscali.it> * Kurdish translation - Amed Çeko Jiyan <amedcj@gmail.com> + Amed �eko Jiyan <amedcj@gmail.com> * Portuguese translation Sergio Marques <smarquespt@gmail.com> @@ -525,7 +536,7 @@ $Id: CHANGES.txt,v 1.735 2010/04/24 20:20:19 perepujal Exp $ ----------------- * Asturian Xandru Armesto <alarmes@wanadoo.es> - Mikel González <mikelisimu@yahoo.es> + Mikel Gonz�lez <mikelisimu@yahoo.es> * Localization Updates: --------------------- @@ -533,7 +544,7 @@ $Id: CHANGES.txt,v 1.735 2010/04/24 20:20:19 perepujal Exp $ Samuel Murray (Groenkloof) <samuel@translate.org.za> * German translation - Burkhard Lück <lueck@hube-lueck.de> + Burkhard L�ck <lueck@hube-lueck.de> * Greek translation: Yannis Papatzikos <papatzikos@yahoo.gr> @@ -546,7 +557,7 @@ $Id: CHANGES.txt,v 1.735 2010/04/24 20:20:19 perepujal Exp $ Alesis Novik <alesisnov@gmail.com> * Slovakian translation - Peter Tuhársky <tuharsky@misbb.sk> + Peter Tuh�rsky <tuharsky@misbb.sk> * Spanish translation Gabriel Gazzan <ggabriel@internet.com.uy> @@ -721,7 +732,7 @@ $Id: CHANGES.txt,v 1.735 2010/04/24 20:20:19 perepujal Exp $ Edmund GRIMLEY EVANS <edmundo@rano.org> * Faroese translation - Lis Gøthe í Jákupsstovu <morshus@gmail.com> + Lis G�the � J�kupsstovu <morshus@gmail.com> * Finnish translation Jorma Karvonen <karvjorm@users.sf.net> @@ -1022,7 +1033,7 @@ $Id: CHANGES.txt,v 1.735 2010/04/24 20:20:19 perepujal Exp $ Jacques Chion <Jacques.Chion@wanadoo.fr> * German translation - Burkhard Lück <lueck@hube-lueck.de> + Burkhard L�ck <lueck@hube-lueck.de> * Gujarati translation Kartik Mistry <kartik.mistry@gmail.com> @@ -1042,7 +1053,7 @@ $Id: CHANGES.txt,v 1.735 2010/04/24 20:20:19 perepujal Exp $ * Norwegian Nynorsk translation Karl Ove Hufthammer <huftis@users.sourceforge.net> - * Norwegian Bokmål translation + * Norwegian Bokm�l translation Karl Ove Hufthammer <huftis@users.sourceforge.net> * Polish translation @@ -1368,7 +1379,7 @@ $Id: CHANGES.txt,v 1.735 2010/04/24 20:20:19 perepujal Exp $ Freek de Kruijf <f.de.kruijf@hetnet.nl> * Faroese - Lis Gøthe í Jákupsstovu <morshus@gmail.com> + Lis G�the � J�kupsstovu <morshus@gmail.com> * Gujarati Kartik Mistry <kartik.mistry@gmail.com> @@ -1524,7 +1535,7 @@ $Id: CHANGES.txt,v 1.735 2010/04/24 20:20:19 perepujal Exp $ Khalid Al Holan <alholan@gmail.com> * Faroese - Lis Gøthe í Jákupsstovu <morshus@gmail.com> + Lis G�the � J�kupsstovu <morshus@gmail.com> * Gujarati -- includes "gu.ttf" font Kartik Mistry <kartik.mistry@gmail.com> @@ -1578,7 +1589,7 @@ $Id: CHANGES.txt,v 1.735 2010/04/24 20:20:19 perepujal Exp $ Leandro Regueiro <leandro.regueiro@gmail.com> * German - Burkhard Lück <lueck@hube-lueck.de> + Burkhard L�ck <lueck@hube-lueck.de> * Greek Sokratis Sofianopoulos <sokratis.sofianopoulos@gmail.com> @@ -1612,7 +1623,7 @@ $Id: CHANGES.txt,v 1.735 2010/04/24 20:20:19 perepujal Exp $ * Spanish Pablo Pita <pablo.pita@kdemail.net> - Gabriel Gazzán <ggabriel@internet.com.uy> + Gabriel Gazz�n <ggabriel@internet.com.uy> * Thai Ouychai Chaita <ae.freeman@gmail.com> @@ -2097,7 +2108,7 @@ $Id: CHANGES.txt,v 1.735 2010/04/24 20:20:19 perepujal Exp $ * Mentioned Tux Paint Config. tool in FAQ. * French documentation created. - Jérôme Chantreau <plovemax@hotmail.com> + J�r�me Chantreau <plovemax@hotmail.com> * New translations: ----------------- @@ -2133,7 +2144,7 @@ $Id: CHANGES.txt,v 1.735 2010/04/24 20:20:19 perepujal Exp $ * Mexican Spanish Ignacio Tike <ignaciotike@spymac.com> Daniel Illingworth <webmaster@intermagen.net> - Luis C. Suárez M. <luiscsuarez@gmail.com> + Luis C. Su�rez M. <luiscsuarez@gmail.com> * Swahili Martin Benjamin <martin.benjamin@yale.edu> @@ -2171,7 +2182,7 @@ $Id: CHANGES.txt,v 1.735 2010/04/24 20:20:19 perepujal Exp $ * German Patrick <nc-spechtpa3 [At] netcologne DOT de> - Burkhard Lück <lueck@hube-lueck.de> + Burkhard L�ck <lueck@hube-lueck.de> * Greek The Greek Linux i18n Team <i18ngr@lists.hellug.gr> @@ -2206,11 +2217,11 @@ $Id: CHANGES.txt,v 1.735 2010/04/24 20:20:19 perepujal Exp $ Eugene Zelenko <greendeath@mail.ru> * Spanish and Spanish documentation. - Gabriel Gazzán <ggabriel@internet.com.uy> + Gabriel Gazz�n <ggabriel@internet.com.uy> * Swedish Magnus Dahl <magnus.dahl@bredband.net> - Tomas Skäre <tomas@nocrew.org> + Tomas Sk�re <tomas@nocrew.org> * Vietnamese Clytie Siddall <clytie@riverland.net.au> @@ -2352,7 +2363,7 @@ $Id: CHANGES.txt,v 1.735 2010/04/24 20:20:19 perepujal Exp $ Pere Pujal Carabantes <ppujal@airtel.net> * Updated Danish translation. - Mogens Jæger <mogensjaeger@get2net.dk> + Mogens J�ger <mogensjaeger@get2net.dk> * Updated Dutch translation. Geert Stams <geertstams@wanadoo.nl> @@ -2367,7 +2378,7 @@ $Id: CHANGES.txt,v 1.735 2010/04/24 20:20:19 perepujal Exp $ Roland Illig <roland.illig@gmx.de> * Updated Hungarian translation. - Török Gábor <gabo@linuxportal.hu> + T�r�k G�bor <gabo@linuxportal.hu> * Updated Icelandic translation. Pjetur G. Hjaltason <pjetur@pjetur.net> @@ -2403,7 +2414,7 @@ $Id: CHANGES.txt,v 1.735 2010/04/24 20:20:19 perepujal Exp $ Andrej Kacian <andrej@kacian.sk> * Updated Spanish translation. - Gabriel Gazzán <ggabriel@internet.com.uy> + Gabriel Gazz�n <ggabriel@internet.com.uy> * Updated Tamil translation. Muguntharaj <mugunth@thamizha.com> @@ -2809,7 +2820,7 @@ $Id: CHANGES.txt,v 1.735 2010/04/24 20:20:19 perepujal Exp $ TOYAMA Shin-ichi <shin1@wmail.plala.or.jp> * Added support for some useful HTML escape sequences in stamp descriptions - (e.g., "´" for "á" ("a" with "'" over it)) + (e.g., "´" for "�" ("a" with "'" over it)) Append ".esc" to the locale code (e.g., "fr.esc=...") in the ".txt" description files. @@ -3011,7 +3022,7 @@ $Id: CHANGES.txt,v 1.735 2010/04/24 20:20:19 perepujal Exp $ Karl Ove Hufthammer <karl@huftis.org> * Translated to Hungarian. - Török Gábor <gabo@linuxmania.hu> + T�r�k G�bor <gabo@linuxmania.hu> * Partly translated to Korean. PO file in an unusable charset, though... Mark K. Kim <mkkim214@gmail.com> diff --git a/src/fonts.c b/src/fonts.c index af0a13e..7671c08 100644 --- a/src/fonts.c +++ b/src/fonts.c @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - $Id: fonts.c,v 1.32 2010/02/25 07:06:15 wkendrick Exp $ + $Id: fonts.c,v 1.33 2010/04/27 22:04:44 wkendrick Exp $ */ #include <stdio.h> @@ -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) { diff --git a/src/fonts.h b/src/fonts.h index 45ce075..7517a8d 100644 --- a/src/fonts.h +++ b/src/fonts.h @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - $Id: fonts.h,v 1.19 2010/02/25 07:06:15 wkendrick Exp $ + $Id: fonts.h,v 1.20 2010/04/27 22:04:44 wkendrick Exp $ */ #ifndef FONTS_H @@ -56,6 +56,9 @@ * Move into 'fonts.c' and the code in 'tuxpaint.c' * that uses this lot should be put into 'fonts.c' as well. */ + +#ifdef NO_SDLPANGO +/* Only kill SDL_thread stuff when we're not using Pango, because we need it to let fontconfig make its cache (takes a long time the first time) -bjk 2010.04.27 */ #define SDL_CreateThread(fn,vp) (void*)(long)(fn(vp)) #define SDL_WaitThread(tid,rcp) do{(void)tid;(void)rcp;}while(0) #define SDL_Thread int @@ -66,6 +69,8 @@ #define SDL_mutexV(lock) // release lock #endif +#endif + extern SDL_Thread *font_thread; extern volatile long font_thread_done; @@ -188,4 +193,6 @@ TuxPaint_Font *load_locale_font(TuxPaint_Font * fallback, int size); void sdl_color_to_pango_color(SDL_Color sdl_color, SDLPango_Matrix *pango_color); #endif +int load_user_fonts(SDL_Surface * screen, void *vp, const char *restrict const locale); + #endif diff --git a/src/tuxpaint.c b/src/tuxpaint.c index 669a85a..3c960b7 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - June 14, 2002 - March 22, 2010 + June 14, 2002 - April 27, 2010 */ @@ -95,6 +95,7 @@ #define COLORSEL_CLOBBER_WIPE 8 /* draw the (greyed out) colors, but don't disable */ #define COLORSEL_FORCE_REDRAW 16 /* enable, and force redraw (to make color picker work) */ +/* FIXME: Why are we checking this BEFORE the #include "SDL.h"!? Does this even work? -bjk 2010.04.24 */ /* Setting the amask value based on endianness*/ #if SDL_BYTEORDER == SDL_BIG_ENDIAN #define TPAINT_AMASK 0xff000000 @@ -318,6 +319,7 @@ extern WrapperData macosx; #include <sys/stat.h> #include "SDL.h" +#include "SDL_thread.h" #if !defined(_SDL_H) #error "---------------------------------------------------" #error "If you installed SDL from a package, be sure to get" @@ -6749,6 +6751,65 @@ static int load_user_fonts_stub(void *vp) } #endif +#ifndef NO_SDLPANGO +volatile long fontconfig_thread_done = 0; + +int generate_fontconfig_cache_spinner(SDL_Surface * screen) +{ + SDL_Event event; + + while (fontconfig_thread_done == 0) { + show_progress_bar(screen); + SDL_Flip(screen); + SDL_Delay(20); + + while (SDL_PollEvent(&event) > 0) { + if (event.type == SDL_QUIT || + (event.type == SDL_KEYDOWN && event.key.keysym.sym == SDLK_ESCAPE)) { + printf("Aborting!\n"); fflush(stdout); + return(1); + } + } + } + return(0); +} + +static int generate_fontconfig_cache_real(void) +{ + TuxPaint_Font * tmp_font; + SDL_Surface * tmp_surf; + SDL_Color black = { 0, 0, 0, 0 }; + + printf("-- Hello from generate_fontconfig_cache() (thread # %d)\n", SDL_ThreadID()); fflush(stdout); + + tmp_font = TuxPaint_Font_OpenFont(PANGO_DEFAULT_FONT, NULL, 12); + + if (tmp_font != NULL) + { + printf("-- Generated a font.\n"); fflush(stdout); + tmp_surf = render_text(tmp_font, "Test", black); + if (tmp_surf != NULL) { + printf("-- Generated a surface\n"); fflush(stdout); + SDL_FreeSurface(tmp_surf); + } else { + printf("-- Failed to make a surface!\n"); fflush(stdout); + } + TuxPaint_Font_CloseFont(tmp_font); + } else { + printf("-- Failed to generate a font!\n"); fflush(stdout); + } + + fontconfig_thread_done = 1; + + printf("-- generate_fontconfig_cache() is done\n"); fflush(stdout); + return(0); +} + +static int generate_fontconfig_cache(void *vp) +{ + return generate_fontconfig_cache_real(); +} +#endif #define hex2dec(c) (((c) >= '0' && (c) <= '9') ? ((c) - '0') : \ ((c) >= 'A' && (c) <= 'F') ? ((c) - 'A' + 10) : \ @@ -20612,6 +20673,7 @@ static void do_lock_file(void) free(lock_fname); } + ///////////////////////////////////////////////////////////////////////////// static void setup(void) { @@ -20636,7 +20698,9 @@ static void setup(void) Uint32(*getpixel_tmp_btn_down) (SDL_Surface *, int, int); Uint32(*getpixel_img_paintwell) (SDL_Surface *, int, int); int big_title; - +#ifndef NO_SDLPANGO + SDL_Thread * fontconfig_thread; +#endif @@ -20911,6 +20975,74 @@ static void setup(void) SDL_Flip(screen); + +#if defined(WIN32) && defined(LARGE_CURSOR_FULLSCREEN_BUG) + if (fullscreen && no_fancy_cursors == 0) + { + fprintf(stderr, "Warning: An SDL bug causes the fancy cursors to leave\n" + "trails in fullscreen mode. Disabling fancy cursors.\n" + "(You can do this yourself with 'nofancycursors' option,\n" + "to avoid this warning in the future.)\n"); + no_fancy_cursors = 1; + } +#endif + + + /* Create cursors: */ + + scale = 1; + +#ifdef SMALL_CURSOR_SHAPES + scale = 2; +#endif + +#ifdef __APPLE__ + cursor_arrow = SDL_GetCursor(); /* use standard system cursor */ +#endif + + /* this one first, because we need it yesterday */ + cursor_watch = get_cursor(watch_bits, watch_mask_bits, + watch_width, watch_height, + 14 / scale, 14 / scale); + + do_setcursor(cursor_watch); + show_progress_bar(screen); + + + + +#ifndef NO_SDLPANGO + /* Let Pango & fontcache do their work without locking up */ + + fontconfig_thread_done = 0; + + printf("Spawning Pango thread\n"); fflush(stdout); + + fontconfig_thread = SDL_CreateThread(generate_fontconfig_cache, NULL); + if (fontconfig_thread == NULL) { + fprintf(stderr, "Failed to create Pango setup thread: %s\n", SDL_GetError()); + } else { + printf("Thread spawned\n"); fflush(stdout); + if (generate_fontconfig_cache_spinner(screen)) /* returns 1 if aborted */ + { + printf("Aborted!\n"); fflush(stdout); + SDL_KillThread(fontconfig_thread); + SDL_Quit(); + exit(0); + /* FIXME: Let's be more graceful about exiting (e.g., clean up lockfile!) -bjk 2010.04.27 */ + } + printf("Done generating cache\n"); fflush(stdout); + } + + +#ifdef FORKED_FONTS + /* NOW we can fork our own font scanner stuff, and let it run in the bgkd -bjk 2010.04.27 */ + printf("Now running font scanner\n"); fflush(stdout); + run_font_scanner(screen, lang_prefixes[get_current_language()]); +#endif + +#endif + medium_font = TuxPaint_Font_OpenFont(PANGO_DEFAULT_FONT, DATA_PREFIX "fonts/default_font.ttf", 18 - (only_uppercase * 3)); @@ -20950,38 +21082,6 @@ static void setup(void) SDL_Flip(screen); -#if defined(WIN32) && defined(LARGE_CURSOR_FULLSCREEN_BUG) - if (fullscreen && no_fancy_cursors == 0) - { - fprintf(stderr, "Warning: An SDL bug causes the fancy cursors to leave\n" - "trails in fullscreen mode. Disabling fancy cursors.\n" - "(You can do this yourself with 'nofancycursors' option,\n" - "to avoid this warning in the future.)\n"); - no_fancy_cursors = 1; - } -#endif - - - /* Create cursors: */ - - scale = 1; - -#ifdef SMALL_CURSOR_SHAPES - scale = 2; -#endif - -#ifdef __APPLE__ - cursor_arrow = SDL_GetCursor(); /* use standard system cursor */ -#endif - - /* this one first, because we need it yesterday */ - cursor_watch = get_cursor(watch_bits, watch_mask_bits, - watch_width, watch_height, - 14 / scale, 14 / scale); - - do_setcursor(cursor_watch); - show_progress_bar(screen); - #ifdef FORKED_FONTS reliable_write(font_socket_fd, &no_system_fonts, sizeof no_system_fonts); #else @@ -21631,10 +21731,19 @@ int main(int argc, char *argv[]) chdir_to_binary(argv[0]); setup_config(argv); + + + CLOCK_ASM(time2); #ifdef FORKED_FONTS // must start ASAP, but depends on locale which in turn needs the config +#ifdef NO_SDLPANGO + /* Only fork it now if we're not planning on creating a thread to handle fontconfig stuff -bjk 2010.04.27 */ + printf("Running font scanner\n"); fflush(stdout); run_font_scanner(screen, lang_prefixes[get_current_language()]); +#else + printf("NOT running font scanner\n"); fflush(stdout); +#endif #endif /* Set up! */ |