Commit graph

20 commits

Author SHA1 Message Date
William Kendrick
be2b5537b3 * 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.
2010-04-27 22:04:43 +00:00
William Kendrick
7b31b7549d Patch collection from Volker Grabsch to help Tux Paint cross-compile for Windows:
* Solve the 'FIXME: "finddir" ...' (The trick is to use "=" instead of ":=". That way, $(beos_PREFIX) will only be evaluated when it is actually used.)
* include "shlwapi.h" instead of "Shlwapi.h" (Otherwise, compiling for Windows will fail on a case sensitive file system. (e.g. a Unix file system when cross compiling))
* use FILENAME_MAX instead of NAME_MAX (FILENAME_MAX is more portable than NAME_MAX. Also, recent MinGW versions don't support NAME_MAX anymore.)
* Exposing font_thread_aborted via extern [tweak to Volker's patch which removed a logic test, which is probably not what we want]
* include parse.h (and thus compiler.h) after <stdio.h> (This ensures that the perror() macro of compiler.h won't confuse the perror() function declaration of <stdio.h>.)
* fix another compiling error about undefined variables (The tuxpaint.c uses printcommand/altprintcommand/papersize even when they aren't defined, i.e. when libpaper is not used. This patch solves the issue by using "#ifdef PAPER_H")
* call show_available_papersizes() only when libpaper is used
* permit cross compiling by using Make variables instead of hard-coded tools

Documented scottmc's Haiku improvements.
2010-02-25 07:06:13 +00:00
William Kendrick
6e6ee1f8a3 Trying to get it to build without Pango. 2010-02-02 23:40:53 +00:00
Albert Cahalan
e3a971194c options working fairly well 2009-11-23 07:45:24 +00:00
Albert Cahalan
3d15a468cd lots of functions made static (some had to be moved) 2009-11-22 23:17:35 +00:00
Albert Cahalan
f296909c75 have to reset y_nudge if wiping out lang/locale 2009-11-21 11:30:19 +00:00
Albert Cahalan
9a00845f50 moving more code past start of font scanning 2009-11-16 08:54:48 +00:00
William Kendrick
0bdbefcda7 Added copyright/license to source files that lacked it. 2009-06-03 20:46:07 +00:00
William Kendrick
a219080838 Skipping locale-specific fonts, unless we're in that locale.
Providing option to load all locale fonts anyway (the old behavior).
Renaming zh_tw.ttf to zh_TW.ttf.
2009-06-01 04:02:40 +00:00
Martin Fuhrer
926ee26f67 Mac OS X updates: Added dialog box requesting user to wait while font cache is being built. Added experimental speech synthesis support. 2008-01-04 05:39:15 +00:00
William Kendrick
344492dad4 BeOS updates. 2007-12-07 00:05:45 +00:00
William Kendrick
0eecea9581 Magic compiles silenced.
Attempted Text tool font load under pango.
Made pango optional.
TuxPaint_Font is aware of both panfgo contexts & sdl_ttf ttf fonts.
2007-07-13 18:18:20 +00:00
William Kendrick
095ba8efb3 Began adding support for using SDL_Pango, a wrapper to Pango,
a library for layout and rendering of text, with an emphasis on
internationalization.  (The hope is to improve support for languages
that SDL_ttf doesn't support well; e.g., Arabic and Telegu.)

TTF_Font structs and some functions were replaced by a new
TuxPaint_Font struct and function, which wraps around either TTF_Font
or SDLPango_Context, depending on whether SDL_Pango is being used.
Note: STILL NEEDS WORK!
2007-07-12 18:43:18 +00:00
William Kendrick
bccb269062 New starters: 10x10 grid & 20x20 grid
Reordered font-loading to happen after locale switch occurs, to
pick up font-organizing string translations (e.g., "Aa", "qx", etc.).
Attempting to help address issue of Latin-only fonts being available
in non-Latin locales -- seemed to help with Norwegian.
Czech translation update.
Russian README documentation
2007-06-06 18:31:54 +00:00
Albert Cahalan
542aaf4cad It runs on the OLPC XO now, unless you run out of memory. Do not even think of using stamps, system fonts, etc. 2007-03-12 03:55:30 +00:00
John Popplewell
7c3f7ad0b7 Disable threaded font loading on Windows because it's unreliable. Would be nice to fix this properly one day... 2006-09-18 19:14:00 +00:00
William Kendrick
7716a05281 Ran source code through "indent -nbfda -npcs -npsl -bli0". 2006-08-27 21:00:52 +00:00
John Popplewell
f482a789f6 Fix to make font sizing work. 2006-02-20 06:14:12 +00:00
John Popplewell
2982961f38 Various fixes for win32, mostly as a result of the splits. 2006-02-20 04:12:27 +00:00
William Kendrick
e964eb17a0 More splits from "tuxpaint.c":
+ "debug.h": Defines whether debugging printf() calls should be enabled.
  + "dirwalk.c/h": Callback functions for recursive directory traversal.
  + "fonts.c/h": Font loading/grouping/discarding variables and functions.
  + "get_fname.c/h": Functions for constructing preferred file paths.
2006-02-19 08:02:39 +00:00