Large bundle of OS X tweaks by Eric P. (basis of the 10.9-compatible
pre-release made in Dec. 2013): * Fix OS X 10.9 issue of current directory set by Finder to something else than folder where app bundle resides. * Some Mac OS X build / project changes & updates. * Adjustments to Mac OS X fontconfig config file, to avoid warnings and make things more robust. * Updates to some #include's to catch up with newer library revisions. * Tweaks to pixel read/write on Apple. * Introduction of 'intprt_t' casting to avoid warnings on x64. * Some additional debugging output. * Logging stderr & stdout to /tmp/tuxpaint.log Untested (I don't have a Mac!)
This commit is contained in:
parent
e5b2182c0a
commit
e990b48de7
14 changed files with 982 additions and 817 deletions
|
|
@ -107,13 +107,13 @@ void loadfont_callback(SDL_Surface * screen, const char *restrict const dir,
|
|||
char fname[512];
|
||||
TuxPaint_Font *font;
|
||||
snprintf(fname, sizeof fname, "%s/%s", dir, files[i].str);
|
||||
/* printf("Loading font: %s (locale is: %s)\n", fname, (locale ? locale : "NULL")); */
|
||||
/* */printf("Loading font: %s (locale is: %s)\n", fname, (locale ? locale : "NULL")); /**/ //EP
|
||||
if (locale && strstr(fname, "locale") && !all_locale_fonts)
|
||||
{
|
||||
char fname_check[512];
|
||||
/* We're (probably) loading from our locale fonts folder; ONLY load our locale's font */
|
||||
snprintf(fname_check, sizeof fname_check, "%s/%s.ttf", dir, locale);
|
||||
/* printf("checking vs \"%s\" vs \"%s\"\n", fname_check, fname); */
|
||||
/* */printf("checking vs \"%s\" vs \"%s\"\n", fname_check, fname); /**/ //EP
|
||||
if (strcmp(fname, fname_check) == 0)
|
||||
font = TuxPaint_Font_OpenFont("", fname, text_sizes[text_size]);
|
||||
else
|
||||
|
|
@ -136,7 +136,7 @@ void loadfont_callback(SDL_Surface * screen, const char *restrict const dir,
|
|||
family, style);
|
||||
|
||||
printf("success: tpf: 0x%x tpf->ttf_font: 0x%x\n",
|
||||
(unsigned int) font, (unsigned int) font->ttf_font);
|
||||
(unsigned int)(intptr_t) font, (unsigned int)(intptr_t) font->ttf_font); //EP added (intptr_t) to avoid warning on x64
|
||||
#endif
|
||||
|
||||
// These fonts crash Tux Paint via a library bug.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue