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.

> I'm using *.otf fonts right now. As for the others, I saw a FreeType
> patch that would support them via normal filenames.
>
> Without that patch, there are problems. FreeType has a special
> interface for loading via Mac resource forks, but libSDL_ttf
> doesn't offer a wrapper for it.
>
> Well, I suggest you simply try the latest Tux Paint (as of a few
> minutes ago) with a recent FreeType and tell us how it goes.

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:

[Session started at 2005-01-08 11:37:13 -0700.]
could not open Apple LiGothic Medium.dfont
could not open AppleGothic.dfont
could not open AquaKanaBold.otf
could not open AquaKanaRegular.otf
could not open Courier.dfont
Bad font, 'a' and 'z' match: Geeza Pro Bold.ttf, Geeza Pro, Bold
Bad font, 'a' and 'z' match: Geeza Pro.ttf, Geeza Pro, Regular
could not open Geneva.dfont
could not open Hei.dfont
could not open Helvetica.dfont
could not open Keyboard.dfont
could not open LastResort.dfont
could not open LucidaGrande.dfont
could not open Monaco.dfont
could not open Osaka.dfont
could not open OsakaMono.dfont
could not open Symbol.dfont
could not open Times.dfont
could not open ZapfDingbats.dfont
Bad font, 'a' and 'z' match: [EMAIL PROTECTED](B Pro W3.otf, Hiragino Mincho Pro, W3
Bad font, 'a' and 'z' match: [EMAIL PROTECTED](B Pro W6.otf, Hiragino Mincho Pro, W6
could not open #Gungseouche.dfont
could not open #HeadlineA.dfont
could not open #PCmyoungjo.dfont
could not open #Pilgiche.dfont
Bad font, 'a' and 'z' match: AlBayan.ttf, Al Bayan, Plain
Bad font, 'a' and 'z' match: AlBayanBold.ttf, Al Bayan, Bold
could not open AmericanTypewriter.dfont
...
...

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".

Martin

_______________________________________________
Tuxpaint-dev mailing list
Tuxpaint-dev@tux4kids.net
http://tux4kids.net/mailman/listinfo/tuxpaint-dev

Reply via email to