On Sat, 2005-01-08 at 14:53, Martin Fuhrer wrote: > On 8-Jan-05, at 2:38 AM, Albert Cahalan wrote: > > > > I have this now: > > > > #elif defined(__APPLE__) > > loadfonts("/System/Library/Fonts", 0); > > loadfonts("/Library/Fonts", 0); > > loadfonts("/usr/share/fonts", 0); > > loadfonts("/usr/X11R6/lib/X11/fonts", 0); > > I've added the path to the User's fonts directory to CVS, via a Cocoa > API call.
You can't just use getenv("HOME") for that? Would /Network/Library/Fonts also be good? Mozilla uses or used this one. (saw it in a prefs.js patch) > Most fonts are being ignored, but a few are loading fine (primarly .ttf > fonts). Here is a sampling of the errors I get from the other fonts: Bummer. Is there a newer version of FreeType that you could be using? If that won't do, TTF_OpenFontIndexRW can take care of the problem. Append "/rsrc" to the Mac name to get at the resource fork if needed. Then, for both types of troublesome files, parse the structure to find a normal file file embedded inside. This'll work with the Linux hfs filesystem driver too. > As well, the following line in tuxpaint.c is producing a compile error: > > const char *restrict const suffixes[] = {"ttf", "otf", "pfa", "pfb", > "dfont", "ttc",}; > > /Users/mfuhrer/Projects/TuxPaint/tuxpaint-cvs/tuxpaint/src/tuxpaint.c: > In function `loadfonts': > /Users/mfuhrer/Projects/TuxPaint/tuxpaint-cvs/tuxpaint/src/tuxpaint.c: > 14226: error: invalid use of `restrict' > /Users/mfuhrer/Projects/TuxPaint/tuxpaint-cvs/tuxpaint/src/tuxpaint.c: > 14226: error: invalid use of `restrict' > > I can get around it by removing "restrict". What compiler are you using? What options did you give it? Note that src/tuxpaint.c contains the following: #if !defined(restrict) && __STDC_VERSION__ < 199901 #if __GNUC__ > 2 || __GNUC_MINOR__ >= 92 #define restrict __restrict__ #else #warning No restrict keyword? #define restrict #endif #endif _______________________________________________ Tuxpaint-dev mailing list Tuxpaint-dev@tux4kids.net http://tux4kids.net/mailman/listinfo/tuxpaint-dev