freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] Hide Carbon-dependency of ftmac.c ([ft] cannot open some


From: Sean McBride
Subject: Re: [ft-devel] Hide Carbon-dependency of ftmac.c ([ft] cannot open some fonts on mac and linux)
Date: Wed, 26 Sep 2007 10:39:56 -0400

On 9/22/07 6:32 PM, address@hidden said:

>Recently David Turner proposed to use dlsym()-type features for
>ftmac.c to solve the incompatibilities of libfreetype.dylib
>with ftmac.c and without ftmac.c, in freetype mailing list.

I guess I missed this discussion... what date was the first post?

>As a proof of his idea, I wrote a sample header file "ftmacdyn.h"
>to replace Carbon-derived functions in ftmac.c by the function
>pointers. By including ftmacdyn.h, ftmac.c is changed to resolve
>the Carbon functions in runtime, without writing the code but
>insersion a few initialization routines. libfreetype.dylib has
>no explicit symbol reference to Carbon frameworks.
>
>I want to discuss with developers importing Unix applications
>to Mac OS X, about the idea using such hook to remove the
>explicit symbol reference of Mac OS specific frameworks.

I don't understand what problem this is trying to solve.  Can someone
summarise?  I can understand that some developers may not want to bring
in Carbon dependency, but freetype already has a switch to turn off all
the Carbon functions, is it not sufficient?

But here are my thoughts anyway...

- even with your changes, Carbon.h must still be included (for structure
& type definitions, etc.)
- although you don't call Carbon functions explicitly, the code is still
Mac-only
- the code is much less readable and much less maintainable.
- the code uses private symbols (ex: ApplicationServicesVersionNumber)

>I think it's sufficient as a draft for further discussion,
>but attached ftmacdyn.h is NOT finished work, there are several
>issues:
>
>* CPP feature: Current ftmacdyn.h uses C99 preprocessor macros
>  (to handle variadic arguments). They are incompatible with
>  "-ansi" option. The legacy C compiler of Mac OS X 10.0 (using
>  precompiled header by default) cannot process it by default.

_Nobody_ uses 10.0!  10.0 cannot play DVDs, 10.0 cannot burn CDs.  It
was essentially a beta OS.  I strongly suggest that you target 10.2 as a
minimum.  At their summer 2007 WWDC conference, Apple stated that 67% of
the 22 million active Mac OS X users are using 10.4, 23% are using 10.3,
and 10% are using 10.2 or older.

--
____________________________________________________________
Sean McBride, B. Eng                 address@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada






reply via email to

[Prev in Thread] Current Thread [Next in Thread]