Hi mpsuzuki, the traditional, and painful, way to deal with this sort of problems in a seamless way (at least for the user) is to use dlopen()-style dynamic linking to access the "missing" Carbon functions.
what this means is that: - the libfreetype.lib would not explicitely link to Carbon, and thus could always be linked to non-Carbon programs - the libfreetype.lib contains code that uses dlopen() or whatever Darwin provides to determine if Carbon functions are available in the currently running program. If so, it would enable Carbon-related features automatically (by essentially doing a dlsym() of all required Carbon functions, storing the result in pointers, and calling them through these pointers) of course, all the linking must be done explicitely in the code. usually, a lot of this glue code is generated by a script. do you think it'd be possible to add this to FreeType, to get rid of the --with-old-mac-fonts and related issues ? I know it's non trivial work, but that would be the right thing to do. - David On Thu, 20 Sep 2007 23:27:32 +0900, [EMAIL PROTECTED] said: > Hi, > > On Thu, 20 Sep 2007 14:57:50 +0200 > Riccardo Cohen <[EMAIL PROTECTED]> wrote: > >I ran ftdump with this flag and the font was open correctly. my program > >could now read all suitcase. > > Good. I guess 2 dfonts (Keyboard.dfont and LastResort.dfont) > cannot be loaded, because they are designed for special purpose > (see freetype2-x.y.z/src/gxvalid/README), but others are > loadable. If you find any unloadable fonts, please let me > know. > > >But does this mean that I will have problem and conflicts between > >quickdraw and freetype ? Is there any documentation about the troubles > >you spoke about ? > > One of the popular trouble is... let me tell a lengthy story. > > There are people who build Unix free softwares for MacOS > and distribute their prebuilt binaries. Some of them use > the development environment including libfreetype.dylib > (MacOS shared library) built without Carbon framework, > because they want to do as they do on other standard POSIX > systems without proprietary Carbon framework. > > When their binaries are executed, dynamic linker doesn't > search Carbon framework at all, because the developers > don't use Carbon framework when the developers link the > program. > > If I insert Carbon-dependent libfreetype.dylib into the > runtime libraries, how the binary is loaded? > My libfreetype.dylib wants the dynamic linker to resolve > QuickDraw functions in Carbon framework when the binary > is loaded. But the dynamic linker doesn't search Carbon > framework, because the program was not linked with Carbon > framework. As a result, all Carbon functions in my > libfreetype.dylib is claimed as unresolvable, and the > program cannot be executed. There are several ugly hack > to cover such unresolvable function issues, but no general > solution working for all Mac OS X. > > If you install 2 different libfreetype.dylib on your > system and tune DYLD_LIBRARY_PATH carefully for each > programs, this trouble can be avoided, but it won't be > pragmatic. > > -- > > The most beautiful solution is Carbon-free suitcase font > support. Masatake Yamato had already implemented initial > codes, and the enhancement and completion of it is my task, > but it's not finished yet. Sorry again for your inconvenience. > > Regards, > mpsuzuki > > >[EMAIL PROTECTED] wrote: > >> Hi, > >> > >> I'm current maitainer of MacOS specific part of > >> FreeType2, sorry for your inconvenience. > >> > >> On Thu, 20 Sep 2007 12:25:01 +0200 > >> Riccardo Cohen <[EMAIL PROTECTED]> wrote: > >>> MAC > >>> --- > >>> some basic fonts (/Library/Fonts/Arial) are not open, and I have about > >>> 50% of font files that fail to open with FT_New_Face(). It seems that it > >>> is all mac font suitcases... which are used by all native softwares. > >> > >> Recent FreeType2 does not enable the support code > >> for suitcase font format (to avoid binary incompatibility > >> troubles by unexpected QuickDraw framework). > >> Please try "configure --with-old-mac-fonts". > >> > >> Regards, > >> mpsuzuki > >> > > > >-- > > > >Riccardo Cohen > >ligne directe : 02-47-49-63-24 > >------------------------------------------- > >Articque > >http://www.articque.com > >37230 Fondettes - France > >tel : 02-47-49-90-49 > >fax : 02-47-49-91-49 > > > > > >_______________________________________________ > >Freetype mailing list > >[email protected] > >http://lists.nongnu.org/mailman/listinfo/freetype > > > -- > 鈴木 > > > _______________________________________________ > Freetype mailing list > [email protected] > http://lists.nongnu.org/mailman/listinfo/freetype _______________________________________________ Freetype mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/freetype
