[ft-devel] Freetype on Mac uses deprecated functions

2005-08-24 Thread Sean McBride
Hello,

This is my first post, so please be gentle. :)

I don't actually use freetype, except that I use vtk () which uses freetype.

I am writing here to report a 'bug' of sorts.  Basically, it seems the
freetype implementation on the Mac is somewhat antiquated. I receive the
following warnings about the use of deprecated functions:

ftmac.c:179: warning: 'FSpGetFInfo' is deprecated
ftmac.c:234: warning: 'PBGetFCBInfoSync' is deprecated
ftmac.c:264: warning: 'FSMakeFSSpec' is deprecated
ftmac.c:838: warning: 'FMCreateFontFamilyIterator' is deprecated
ftmac.c:848: warning: 'FMGetNextFontFamily' is deprecated
ftmac.c:858: warning: 'FMGetFontFamilyName' is deprecated
ftmac.c:859: warning: 'CopyPascalStringToC' is deprecated
ftmac.c:862: warning: 'FMCreateFontFamilyInstanceIterator' is deprecated
ftmac.c:873: warning: 'FMGetNextFontFamilyInstance' is deprecated
ftmac.c:898: warning: 'FMDisposeFontFamilyInstanceIterator' is deprecated
ftmac.c:902: warning: 'FMDisposeFontFamilyIterator' is deprecated
ftmac.c:906: warning: 'FMGetFontContainer' is deprecated

These functions have been officially deprecated as of Mac OS 10.4 Tiger,
but unofficially deprecated long ago.  The two main points are:
 - FSSpecs should be replaced with FSRefs
   - 
 - Font Manager calls should be replaced with ATS for Fonts.
   - 
   - The main header is ATSFont.h, in ApplicationServices/ATS

Of course, this isn't a short term problem, and I am not in a position
to supply a patch, but I did want to bring this to your attention.

Thanks,

--

Sean McBride, B. Eng [EMAIL PROTECTED]
Rogue Researchwww.rogue-research.com
Mac Software Developer  Montréal, Québec, Canada




___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-08-24 Thread mpsuzuki
Hi,

On Wed, 24 Aug 2005 12:41:52 -0400
"Sean McBride" <[EMAIL PROTECTED]> wrote:
>These functions have been officially deprecated as of Mac OS 10.4 Tiger,
>but unofficially deprecated long ago.  The two main points are:
> - FSSpecs should be replaced with FSRefs
>   - 
> - Font Manager calls should be replaced with ATS for Fonts.
>   - ATS_Concepts/atsfonts_intro/chapter_1_section_1.html>
>   - The main header is ATSFont.h, in ApplicationServices/ATS

Thank you for informative references. Do you know any docs to
know about: which version of MacOS has which functions?
I'm not sure if FreeType maintainers have enough sparetime to
support antique MacOSs (System7, MacOS 8 etc), but I think it's
important which platforms are dropped in next ftmac.c (if there's).

Regards,
mpsuzuki


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-08-24 Thread George Williams
On Wed, 2005-08-24 at 17:36, [EMAIL PROTECTED] wrote:
> Thank you for informative references. Do you know any docs to
> know about: which version of MacOS has which functions?
> I'm not sure if FreeType maintainers have enough sparetime to
> support antique MacOSs (System7, MacOS 8 etc), but I think it's
> important which platforms are dropped in next ftmac.c (if there's).
The mac header files, for instance:
/System/Library/CoreServices.frameworks/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers/Files.h
seems to provide this information for each call.

Find the prototype of the call you are interested in, search for
Availability, look for "Non-Carbon CFM". It seems to provide a Mac OS
version number for when the call first appeared.

None of the FSRef calls appear before OS 9.

(Didn't check the font calls)



___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-08-25 Thread Sean McBride
On 2005-08-25 09:36, [EMAIL PROTECTED] said:

>Thank you for informative references. Do you know any docs to
>know about: which version of MacOS has which functions?

In addition to what George said, you can also search from , for example, search for
"FMCreateFontFamilyIterator" and at the top there is a "Higlighted
Results" section that will take you to that API's doc.  Then you see
listed there: "Available in CarbonLib 1.0 and later when running Mac OS
9 or later. Available in Mac OS X 10.0 and later"

>I'm not sure if FreeType maintainers have enough sparetime to
>support antique MacOSs (System7, MacOS 8 etc), but I think it's
>important which platforms are dropped in next ftmac.c (if there's).

Well, from the look of FMCreateFontFamilyIterator's docs, FreeType
already needs Mac OS 9.

Which OSes to support all depends on your target audience/customers, of
course, but I can tell you that most Mac developers these days are
targeting Mac OS X 10.3 or later.  ATS was introduced in 10.0, so
switching to it would mean abandoning Mac OS 9.

--

Sean McBride, B. Eng [EMAIL PROTECTED]
Rogue Researchwww.rogue-research.com
Mac Software Developer  Montréal, Québec, Canada




___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-08-25 Thread George Williams
On Wed, 2005-08-24 at 09:41, Sean McBride wrote:
> I am writing here to report a 'bug' of sorts.  Basically, it seems the
> freetype implementation on the Mac is somewhat antiquated. I receive the
> following warnings about the use of deprecated functions:

>  - FSSpecs should be replaced with FSRefs

I started looking at this. Unfortunately the FSSpec type has wormed its
way into the API for the mac:
  FT_EXPORT_DEF( FT_Error )
  FT_New_Face_From_FSSpec( FT_Librarylibrary,
   const FSSpec *spec,
   FT_Long   face_index,
   FT_Face  *aface )
  FT_EXPORT_DEF( FT_Error )
  FT_GetFile_From_Mac_Name( const char* fontName,
FSSpec* pathSpec,
FT_Long*face_index )

David, how do you want to handle this? It looks as though the API will
have to change to avoid this depreciated type.



___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-08-25 Thread George Williams
On Thu, 2005-08-25 at 06:59, Sean McBride wrote:
> Well, from the look of FMCreateFontFamilyIterator's docs, FreeType
> already needs Mac OS 9.
The mac code contains #ifdefs and there is an #ifdef enabling MAC_OS8.
Whether it works any more I haven't the faintest idea (probably not
because the FMCreateFontFamilyIterator is not #ifdefed)

I presume the proper approach is to add a MAC_OS9 #ifdef.





___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-08-25 Thread Sean McBride
On 2005-08-25 09:07, George Williams said:

>>  - FSSpecs should be replaced with FSRefs
>
>I started looking at this. Unfortunately the FSSpec type has wormed its
>way into the API for the mac:
>  FT_EXPORT_DEF( FT_Error )
>  FT_New_Face_From_FSSpec( FT_Librarylibrary,
>   const FSSpec *spec,
>   FT_Long   face_index,
>   FT_Face  *aface )
>  FT_EXPORT_DEF( FT_Error )
>  FT_GetFile_From_Mac_Name( const char* fontName,
>FSSpec* pathSpec,
>FT_Long*face_index )
>
>David, how do you want to handle this? It looks as though the API will
>have to change to avoid this depreciated type.

Or you could deprecate FT_New_Face_From_FSSpec() and add a new analogous
API FT_New_Face_From_FSRef().

--

Sean McBride, B. Eng [EMAIL PROTECTED]
Rogue Researchwww.rogue-research.com
Mac Software Developer  Montréal, Québec, Canada




___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-08-25 Thread George Williams
On Thu, 2005-08-25 at 09:25, Sean McBride wrote:
> Or you could deprecate FT_New_Face_From_FSSpec() and add a new analogous
> API FT_New_Face_From_FSRef().
Obviously. But that changes freetype's API too.



___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


RE: [ft-devel] Freetype on Mac uses deprecated functions

2005-08-25 Thread Turner, David
> I started looking at this. Unfortunately the FSSpec type has 
> wormed its
> way into the API for the mac:
>   FT_EXPORT_DEF( FT_Error )
>   FT_New_Face_From_FSSpec( FT_Librarylibrary,
>const FSSpec *spec,
>FT_Long   face_index,
>FT_Face  *aface )
>   FT_EXPORT_DEF( FT_Error )
>   FT_GetFile_From_Mac_Name( const char* fontName,
> FSSpec* pathSpec,
> FT_Long*face_index )
> 
> David, how do you want to handle this? It looks as though the API will
> have to change to avoid this depreciated type.
> 
> 

- do not change the signature of public functions, even if
  they're brain-dead

- change their implementation to return FT_Err_Unimplemented
  (unless you're compiling on a legacy system)

- add new public function to use the newest one, use #ifdef
  to avoid defining them on legacy system

am I missing something ?

- David


> 
> ___
> Freetype-devel mailing list
> Freetype-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/freetype-devel
> 


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-09-01 Thread Sean McBride
Hi again all,

Another reason to move away from the old Font Manager and to ATS, is
that some of the Font Manager stuff will not carry over to Mac OS X on
Intel without extra work, see:



Thanks,

--

Sean McBride, B. Eng [EMAIL PROTECTED]
Rogue Researchwww.rogue-research.com
Mac Software Developer  Montréal, Québec, Canada




___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-09-01 Thread Werner LEMBERG

> Another reason to move away from the old Font Manager and to ATS, is
> that some of the Font Manager stuff will not carry over to Mac OS X
> on Intel without extra work, [...]

Any volunteers?  Neither David nor I use a Mac...


Werner


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-09-01 Thread mpsuzuki
On Thu, 01 Sep 2005 23:39:34 +0200 (CEST)
Werner LEMBERG <[EMAIL PROTECTED]> wrote:

>
>> Another reason to move away from the old Font Manager and to ATS, is
>> that some of the Font Manager stuff will not carry over to Mac OS X
>> on Intel without extra work, [...]
>
>Any volunteers?  Neither David nor I use a Mac...

I want to do. I have MacOS 9.2 + MacOS X 10.0 + MacOS 10.1
+ MacOS 10.3 machine. Unfortunately, I have no developer
kit for MacOS 9. Any recommendation what I have to buy?

Regards,
mpsuzuki


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-09-01 Thread Werner LEMBERG
> >> Another reason to move away from the old Font Manager and to ATS,
> >> is that some of the Font Manager stuff will not carry over to Mac
> >> OS X on Intel without extra work, [...]
> >
> >Any volunteers?  Neither David nor I use a Mac...
> 
> I want to do.

Great!  And thanks in advance for your support.


Werner


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


RE: [ft-devel] Freetype on Mac uses deprecated functions

2005-09-02 Thread Turner, David
As far as I understand, this "warning" only applies to
code that reads the resource fork directly and doesn't
try to read fields in cpu-independent order.

A quicky look at the sources shows that:

 - src/base/ftobjs.c   is clean
 - src/base/ftmac.chowever does typecast pointers
   from the FOND data into structure pointers
   directly

it seems clear that 'ftmac.c' needs to be cleared. However,
it should be too long if one uses FreeType's structure and
integer unpacking support (which is already used in all other
parts of the library anyway).

Hope this helps,

- David Turner
  The FreeType Project  (www.freetype.org)


> -Message d'origine-
> De : [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] 
> la part de
> Sean McBride
> Envoyé : jeudi 1 septembre 2005 15:49
> À : freetype-devel@nongnu.org
> Objet : Re: [ft-devel] Freetype on Mac uses deprecated functions
> 
> 
> Hi again all,
> 
> Another reason to move away from the old Font Manager and to ATS, is
> that some of the Font Manager stuff will not carry over to Mac OS X on
> Intel without extra work, see:
> 
> <http://developer.apple.com/documentation/MacOSX/Conceptual/
> universal_binary/universal_binary_tips/chapter_5_section_10.html#//
> apple_ref/doc/uid/TP40002217-CH239-280492>
> 
> Thanks,
> 
> -- 
> 
> Sean McBride, B. Eng [EMAIL PROTECTED]
> Rogue Researchwww.rogue-research.com 
> Mac Software Developer  Montréal, Québec, Canada
> 
> 
> 
> 
> ___
> Freetype-devel mailing list
> Freetype-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/freetype-devel
> 


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-09-02 Thread Christian Demmer
[EMAIL PROTECTED] wrote:
>I want to do. I have MacOS 9.2 + MacOS X 10.0 + MacOS 10.1
>+ MacOS 10.3 machine. Unfortunately, I have no developer
>kit for MacOS 9. Any recommendation what I have to buy?

No need to buy anything. Just get MPW from Apple. It's free.


Be sure to apply the latest updates (Updated MPW Components) since the
last release is from 2001. There is no new release because Apple does
not actively support it anymore.

Greetings, Christian


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


RE: [ft-devel] Freetype on Mac uses deprecated functions

2005-09-02 Thread George Williams
On Fri, 2005-09-02 at 01:28, Turner, David wrote:
> As far as I understand, this "warning" only applies to
> code that reads the resource fork directly and doesn't
> try to read fields in cpu-independent order.
Yes... It uses mac specific calls to handle the resource fork.

But it also adds some calls, for example one which takes a mac font
name, and returns you the filename of a resource file containing that
font. And I can't figure that out with the 10.4 API.



___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-09-02 Thread George Williams
On Thu, 2005-09-01 at 14:39, Werner LEMBERG wrote:
> Any volunteers?  Neither David nor I use a Mac...
I looked into it and was able to fix a few issues, but I've never
bothered to learn the new mac calls and got stuck (it used to be
possible to get a filename from an open file descriptor but I can't work
out how to do that now).

So I gave up.



___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-09-02 Thread Sean McBride
On 2005-09-02 07:49, George Williams said:

>> Any volunteers?  Neither David nor I use a Mac...
>I looked into it and was able to fix a few issues, but I've never
>bothered to learn the new mac calls and got stuck (it used to be
>possible to get a filename from an open file descriptor but I can't work
>out how to do that now).

I can probably help with that... when you say 'file descriptor', what do
you mean exactly? (the term can be overloaded).  Which API did you get
the descriptor from?

--

Sean McBride, B. Eng [EMAIL PROTECTED]
Rogue Researchwww.rogue-research.com
Mac Software Developer  Montréal, Québec, Canada




___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-09-03 Thread mpsuzuki
Dear Sirs,

Sorry for lated response.

On Fri, 02 Sep 2005 11:14:56 +0200
[EMAIL PROTECTED] (Christian Demmer) wrote:
>[EMAIL PROTECTED] wrote:
>>I want to do. I have MacOS 9.2 + MacOS X 10.0 + MacOS 10.1
>>+ MacOS 10.3 machine. Unfortunately, I have no developer
>>kit for MacOS 9. Any recommendation what I have to buy?
>
>No need to buy anything. Just get MPW from Apple. It's free.
>
>
>Be sure to apply the latest updates (Updated MPW Components) since the
>last release is from 2001. There is no new release because Apple does
>not actively support it anymore.

Excuse me, please let me ask fundamental question: MPW or CodeWarrior
are required to compile ftmac.c? There are 3 building control files
in FreeType tree:

* freetype2/builds/mac/freetype.makeis for MPW
* freetype2/builds/mac/ftlib.prjis for CodeWarrior
* freetype2/base/Jamfileis cross platform,
but ftmac.c is quoted for MPW

Could I compile ftmac.c via UNIX style configure/make process?

Regards,
mpsuzuki


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-09-03 Thread Christian Demmer
[EMAIL PROTECTED] wrote:
>Excuse me, please let me ask fundamental question: MPW or CodeWarrior
>are required to compile ftmac.c?

Not necessarily. It depends on your target OS and runtime environment
ABI. If you want OS 9 (CFM) then you need MPW or Codewarrior. OS X can
run CFM (MPW/Codewarrior) or Mach-O produced by gcc or Codewarrior?
(not sure, I don't use Codewarrior).

> There are 3 building control files
>in FreeType tree:
>
>* freetype2/builds/mac/freetype.make   is for MPW

MPW is a shell with makefiles but the makefiles are different from Unix.

>* freetype2/builds/mac/ftlib.prj   is for CodeWarrior
>* freetype2/base/Jamfile   is cross platform,
>   but ftmac.c is quoted for MPW
Not sure here either. I think Jamfiles were used in ProjectBuilder some
time ago, that means OS X/gcc -> Mach-O environment.

>Could I compile ftmac.c via UNIX style configure/make process?

Yes, but only on OS X targeting Mach-O.

Hope this helps, Christian


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-09-03 Thread Wenlin Institute
Just in case this is useful information, I'm using FreeType version  
2.1.4 both on OS 9 (non-Carbon), compiled with CodeWarrior (IDE  
4.1.0.3), and on OS X (Carbon, Mach-0), compiled with XCode 2.1. I  
haven't had time yet to update to a newer version of FreeType. For  
CodeWarrior, I just included the necessary Freetype source files  
directly in the project, rather than make a separate library. For OS  
X, I made "libfreetype.a" with "make" at the command line.


-Tom Bishop

On Sep 3, 2005, at 07:42, Christian Demmer wrote:


[EMAIL PROTECTED] wrote:


Excuse me, please let me ask fundamental question: MPW or CodeWarrior
are required to compile ftmac.c?



Not necessarily. It depends on your target OS and runtime environment
ABI. If you want OS 9 (CFM) then you need MPW or Codewarrior. OS X can
run CFM (MPW/Codewarrior) or Mach-O produced by gcc or Codewarrior?
(not sure, I don't use Codewarrior).



There are 3 building control files
in FreeType tree:

* freetype2/builds/mac/freetype.makeis for MPW



MPW is a shell with makefiles but the makefiles are different from  
Unix.




* freetype2/builds/mac/ftlib.prjis for CodeWarrior
* freetype2/base/Jamfileis cross platform,
but ftmac.c is quoted for MPW

Not sure here either. I think Jamfiles were used in ProjectBuilder  
some

time ago, that means OS X/gcc -> Mach-O environment.



Could I compile ftmac.c via UNIX style configure/make process?



Yes, but only on OS X targeting Mach-O.

Hope this helps, Christian


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel





文林 Wenlin Institute, Inc.Software for Learning Chinese
E-mail: [EMAIL PROTECTED] Web: http://www.wenlin.com
Telephone: 1-877-4-WENLIN (1-877-493-6546)
☯




___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-09-03 Thread mpsuzuki
Dear Mr. Christian Demmer,

On Sat, 03 Sep 2005 16:42:31 +0200
[EMAIL PROTECTED] (Christian Demmer) wrote:

>[EMAIL PROTECTED] wrote:
>>Excuse me, please let me ask fundamental question: MPW or CodeWarrior
>>are required to compile ftmac.c?
>
>Not necessarily. It depends on your target OS and runtime environment
>ABI. If you want OS 9 (CFM) then you need MPW or Codewarrior. OS X can
>run CFM (MPW/Codewarrior) or Mach-O produced by gcc or Codewarrior?
>(not sure, I don't use Codewarrior).
>
>> There are 3 building control files
>>in FreeType tree:
>>
>>* freetype2/builds/mac/freetype.make  is for MPW
>
>MPW is a shell with makefiles but the makefiles are different from Unix.
>
>>* freetype2/builds/mac/ftlib.prj  is for CodeWarrior
>>* freetype2/base/Jamfile  is cross platform,
>>  but ftmac.c is quoted for MPW
>Not sure here either. I think Jamfiles were used in ProjectBuilder some
>time ago, that means OS X/gcc -> Mach-O environment.
>
>>Could I compile ftmac.c via UNIX style configure/make process?
>
>Yes, but only on OS X targeting Mach-O.

Great Thank you very much for detailed explanation. In fact,
I didn't know ProjectBuilder can recognize Jamfile. Now I could
compile ftmac.c for Mach-O target by MacOS X's gcc manually.

Regards,
mpsuzuki


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-09-04 Thread mpsuzuki
Dear Sirs,

First of all, Great Thanks to people giving helpful informations
of Macintosh issues: Sean McBride, George Williams, Tom Bishop, 
Christian Demmer, David Turner and Werner LEMBERG.

I've written a diagram of function-calling-tree of related
functions in ftmac.c.

http://www.gyve.org/~mpsuzuki/ftmac_c.txt

As Sean McBride cited 2 Apple documents, the deprecation issue
consists of 2 function groups: FileManager and FontManager.
I think fixes can be done separately.

For first, I will try fix the problem of FileManager issue.

--

According to Apple TechNotes TN2078, it seems that replacement
of FSSpecXXX() by FSRefXXX() is not sufficient of the deprecation
issue, because the data struture "FSSpec" (which is used to point
a file in Macintosh) itself is deprecated and replacement by
"FSRef" is recommended.

At present, ftmac.c provides a public function to open new face
from given "FSSpec":  FT_New_Face_From_FSSpec(). Thus, complete
cleasing "FSSpec" will cause API incompatibility.
Some configuration option to build without FSSpec might be expected
(and it is expected to be switched off by default, until the day
Apple removes FSSpecXXX() completely).

# I don't know PBMakeFSSpecSync() is deprecated in Tiger.
# If there are some undeprecated functions handling FSSpec,
# it is possible to provide FT_New_Face_From_FSSpec() without
# compiler warning of deprecation. However, PBMakeFSSpecSync()
# is not easy to use, for me.

In addition, from the viewpoint of application programmers,
something like FT_New_Face_From_FSRef() is expected to replace
"FSSpec" in their applications.

Any suggestion about the deprecation of "FSSpec"?

Regards,
mpsuzuki


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


RE: [ft-devel] Freetype on Mac uses deprecated functions

2005-09-05 Thread Turner, David
> >* freetype2/builds/mac/ftlib.prj is for CodeWarrior
> >* freetype2/base/Jamfile is cross platform,
> > but ftmac.c is quoted for MPW
> Not sure here either. I think Jamfiles were used in 
> ProjectBuilder some time ago, that means OS X/gcc -> Mach-O environment.
> 

The Jamfiles located in the FreeType source directories are written
for the standard version of Jam, that handles among lots of other operating
systems, both MacOS and OS X. See http://www.perforce.com/jam/jam.html. 

When used with FT-Jam (a light variant, found at http://www.freetype.org/jam/),
these files can also be used to perform incremental builds correctly, because
FT-Jam knows about #include MACRO_NAME_H schemes and computes header
dependencies automatically.

I know that there is some very _old_ and _modified_ version of Jam
installed with OS X, that is normally being used by ProjectBuilder or
something like that, but I have no idea wether this would work with our
Jamfiles.

I may be possible that the Jamfiles need some small fixes to compile
correctly on MacOS, but nobody had the time to test it until now.
In all cases, it should be very easy to do.

By the way, I'd be interested to know the exact version of Jam that comes
with 10.4. Did they upgrade it ? To know that, simply type "jam -v" or
"jam -?" on the command line.

Regards,

- David Turner
- The FreeType Project  (www.freetype.org)



___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


RE: [ft-devel] Freetype on Mac uses deprecated functions

2005-09-05 Thread Christian Demmer
Turner, David wrote:
>The Jamfiles located in the FreeType source directories are written
>for the standard version of Jam, that handles among lots of other operating
>systems, both MacOS and OS X. See http://www.perforce.com/jam/jam.html. 

Interesting, I didn't know there is Jam for MPW.

>By the way, I'd be interested to know the exact version of Jam that comes
>with 10.4. Did they upgrade it ? To know that, simply type "jam -v" or
>"jam -?" on the command line.

g4c:~ chris$ /Developer/Private/jam -v
Jam/MR  Version 2.2.1.  Copyright 1993, 1997 Christopher Seiwald.
with Apple ProjectBuilder Extensions

Btw. and totally off topic; I never used Jam myself. Do you know of
the top of your head if Jam can handle the situation where a compiler
produces two output files from one source file on which further
compilation depends? This happens with symbol files in Wirth style
languages and make can't handle this.

Greetings, Christian


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


RE: [ft-devel] Freetype on Mac uses deprecated functions

2005-09-05 Thread Turner, David
> Btw. and totally off topic; I never used Jam myself. Do you know of
> the top of your head if Jam can handle the situation where a compiler
> produces two output files from one source file on which further
> compilation depends? This happens with symbol files in Wirth style
> languages and make can't handle this.
> 

Jam can handles this relatively easily, though this isn't part of its
default rules.

You'll need to provide some specific rules/functions within your Jamfile,
but this requires understanding the Jam control language.

Could you let me know precisely what you're speaking of ? I'd
be tempted of providing a solution if it's not too complex.

Regards,

- David Turner
- The FreeType Project  (www.freetype.org)




___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


RE: [ft-devel] Freetype on Mac uses deprecated functions

2005-09-05 Thread Turner, David
> g4c:~ chris$ /Developer/Private/jam -v
> Jam/MR  Version 2.2.1.  Copyright 1993, 1997 Christopher Seiwald.
> with Apple ProjectBuilder Extensions
> 
U, Jam 2.2.1 when Jam 2.5 is out, is backwards compatible, and
contains tons of fixes and enhancements.

I wonder if they use the default version, or produced a custom one
with different built-in rules though.


Thanks,

- David Turner
- The FreeType Project  (www.freetype.org)


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-09-05 Thread mpsuzuki
Dear Sirs,

Status for Tiger's API deprecation issue:
My working source is available from GNU arch archive from

URL: http://www.gyve.org/~mpsuzuki/arch-2005.09.03
archive name: [EMAIL PROTECTED]
project: freetype2--mps-macos--0.1

George Williams sent me his patch skelton to replace
FSSpec by FSRef, it's slightly fixed and applied in
the working tree. Now I'm working for replacement of
FontManager by AppleTypeService, used in FT_GetFile_From_Mac_Name().

The function resolves "abstract" fontname recognized by system
to "concrete" file, but the resolved result is returned by
obsolete FSSpec structure. ATS provides the replacements for
the most functions of FontManager, by 1:1 corresponding functions. 
But FontManager does not provide function to return font file
by FSRef structure, and ATS does not either. In fact, there's
no ATS function to find font file for a given font name,
except of ATSFontGetFileSpecification(). I'm afraid it will be
deprecated in future.

However, I've already written sample programs to resolve
font name -> font file by ATS functions and FSRef data.
They are available from GNU arch in above,

project: carbon-sample--mps--0.0

Yet I've not checked other APIs,
I suppose ATS is designed to hide "concrete" font data, and
I should search other API to find "concrete" font data.
Any suggestions?

Regards,
mpsuzuki


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-09-06 Thread Christian Demmer
Sean McBride wrote:
>Interesting... which Mac OS are you using?  I tried on several 10.4
>machine here (all with dev tools installed) and none of them have jam.

Strange, I use the latest version, nothing special:
  System Version:   Mac OS X 10.4.2 (8C46)
  Kernel Version:   Darwin 8.2.0

Dev tools installed of course. Only idea is, that my machine is updated
and not a clean install of Tiger. Probably Jam came with an older system
version and just stayed along?

Greetings, Christian



___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-09-06 Thread Sean McBride
On 2005-09-05 11:19, Christian Demmer said:

>>By the way, I'd be interested to know the exact version of Jam that comes
>>with 10.4. Did they upgrade it ? To know that, simply type "jam -v" or
>>"jam -?" on the command line.
>
>g4c:~ chris$ /Developer/Private/jam -v
>Jam/MR  Version 2.2.1.  Copyright 1993, 1997 Christopher Seiwald.
>with Apple ProjectBuilder Extensions

Interesting... which Mac OS are you using?  I tried on several 10.4
machine here (all with dev tools installed) and none of them have jam.

--

Sean McBride, B. Eng [EMAIL PROTECTED]
Rogue Researchwww.rogue-research.com
Mac Software Developer  Montréal, Québec, Canada




___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-09-06 Thread Sean McBride
On 2005-09-06 10:54, [EMAIL PROTECTED] said:

>The function resolves "abstract" fontname recognized by system
>to "concrete" file, but the resolved result is returned by
>obsolete FSSpec structure. ATS provides the replacements for
>the most functions of FontManager, by 1:1 corresponding functions.
>But FontManager does not provide function to return font file
>by FSRef structure, and ATS does not either. In fact, there's
>no ATS function to find font file for a given font name,
>except of ATSFontGetFileSpecification().

Unfortunately I think you are right. :(  But ATSFontGetFileSpecification
() is not deprecated, so you can use that.  Then convert the FSSpec it
gives you into something else, like an FSRef.  I filed a bug with Apple
to make an FSRef version of that function.

>I'm afraid it will be
>deprecated in future.

They will only deprecated it if/when they replace it.

--

Sean McBride, B. Eng [EMAIL PROTECTED]
Rogue Researchwww.rogue-research.com
Mac Software Developer  Montréal, Québec, Canada




___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-09-06 Thread mpsuzuki
Dear Mr. Sean McBride,

On Tue, 6 Sep 2005 13:31:13 -0400
"Sean McBride" <[EMAIL PROTECTED]> wrote:

>On 2005-09-06 10:54, [EMAIL PROTECTED] said:
>
>>In fact, there's no ATS function to find font file for a given font name,
>>except of ATSFontGetFileSpecification().
>
>Unfortunately I think you are right. :(  But ATSFontGetFileSpecification
>() is not deprecated, so you can use that.  Then convert the FSSpec it
>gives you into something else, like an FSRef.  I filed a bug with Apple
>to make an FSRef version of that function.

Thank you for advice. OK, I write this issue in TODO and
use ATSFontGetFileSpecification() as temporal workaround.
If you receive any reply from Apple about this issue,
please inform ft-devel people.

>>I'm afraid it will be deprecated in future.
>
>They will only deprecated it if/when they replace it.

I wish this issue is fixed before Intel Mac :-)

Regards,
mpsuzuki


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-09-07 Thread mpsuzuki
Dear Sirs,

Now I'm afraid the replacement of obsolete QuickDraw
FontManager by AppleTypeService with keeping API compatibility
is POSSIBLE but will be complexed. Please allow me spend
a few weeks more. I attached the memo of working direction.

Regards,
mpsuzuki


How to handle QuickDraw FontName without FontManager?
=

outline

To build FreeType2 without compiler's warning on Tiger,
we have to replace almost FM functions by ATS functions.
To handle QuickDraw FM's font name without FM functions,
devious technique may be required.

1. How to specify a font in QuickDraw FontManager system

In FM, a font is specified by "family" typed as FMFamily
(e.g. Courier) and its "instance" typed as FMFont
(e.g. "Courier", "Courier Bold", "Courier Italic": usually
 suffixes like "Bold" "Italic" etc are called as "style").
The FMFont instance itself has no storage for its own name,
the name of instance is specified by joined string of
family-name and style-suffix. This is QuickDraw FontName.
The font name passed to FT_GetFile_From_Mac_Name() is
QuickDraw FontName.

So, to keep API compatibility, we have to handle
QuickDraw FontName.

# [NOTE]
# The suffixes for style are not reserved word.
# Fonts designed for Windows are not in suitcase format,
# and the family is named directly, as "Courier New Bold".

2. How to specify a font in Apple Type Service system
-
In ATS, a font is specified by "font" typed as ATSFontRef.
Also there is "family" typed as ATSFontFamilyRef, but
there's no hierarchical relationship between "font" and
"family". ATS has no support to find a font as a member of
given "family".

# [NOTE]
# There are conversion functions for migration purpose.
# FMFontFamily <-> ATSFontFamilyRef, FMFont <-> ATSFontRef.

3. How to handle QuickDraw FontName in ATS system?


3-1. Problem: discontinuity between ATS font and family
---

ATS "family" can be searched by QuickDraw FamilyName,
but ATS "font" cannot be searched by QuickDraw FontName.
On the other hand, ATS "font" can be used to find a font
file, but ATS "family" cannot be.

Making the situation worse, the naming conventions of
ATS "font" and ATS "family" are incompatible.
Although I've not find exact regularity, it seems that
ATS "font" pefers to ASCII/Roman names but
ATS "family" prefers to nationalized names.
QuickDraw FamilyName is usually nationalized.

For example, for a Korean font file
/Library/Fonts/#Gungseouche.dfont,
ATSFontGetName() returns "#GungSeo Regular",
ATSFontFamilyGetName() returns a Korean script.

Therefore, it's difficult to find a ATS "font" from
given ATS "family" by scanning font names.

3-2. Suggestion: utilization of ATSUI system

Apple Type Services for Unicode Imaging (ATSUI) is text
layout system on the top of ATS. Although it's system
at higher layer, it has its own (in the other word,
incompatible with ATS) font management system, and
ATSUI font-id is compatible with QuickDraw FontManager.

In the font name extraction of ATSUI system, we can specify
the encoding of font name. Therefore, ATSUI can be used
as a translator of font-name.

[continues to experimental result which is now prepared...]


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-09-14 Thread mpsuzuki
Dear Sirs,

Finally I've finished benchmark testing of
"Resolving QuickDraw FontName by ATS, without QuickDraw API".
The result is summarized at:

http://www.gyve.org/~mpsuzuki/ats_benchmark.html

>From the benchmark result, rewriting FT_GetFile_From_Mac_Name() 
with keeping full compatibility with QuickDraw FontName
without QuickDraw FontManager API is very very slow,
it wouldn't payable solution.

In fact, in comparison with original QuickDraw API,
it will be 20 times slower on Panther (Mac OS X 10.3),
and 500 times slower on Cheetar (Mac OS X 10.0).
I think using QuickDraw FontManager API is simple and better.

When we ignore the QuickDraw compatibility, some font names
will be unresolvable after upgrading FreeType. For example,
on Panther, I can find "Courier CE" by QuickDraw, but cannot
find that by ATS.
Correctly speeking, this is not FreeType's problem. There is
fundamental incompatibility of font menu based on QuickDraw
FontManager and that based on ATS. Also this difference is
summarized in the page in above.

Let me ask a question, which is better solution?

Fix A:
FT_GetFile_From_Mac_Name() is kept for QuickDraw.
Add FT_GetFile_From_ATS_Name() for ATS.
To avoid "XXX is deprecated" warning,
FT_GetFile_From_Mac_Name() should be excluded in building.

Fix B:
Change the behaviour of FT_GetFile_From_Mac_Name()
as system-dependent. If configured for ATS only,
it will be incompatible with QuickDraw configuration.

Regards,
mpsuzuki


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-09-15 Thread Werner LEMBERG
> Let me ask a question, which is better solution?
> 
> Fix A:
>   FT_GetFile_From_Mac_Name() is kept for QuickDraw.
>   Add FT_GetFile_From_ATS_Name() for ATS.
>   To avoid "XXX is deprecated" warning,
>   FT_GetFile_From_Mac_Name() should be excluded in building.
> 
> Fix B:
>   Change the behaviour of FT_GetFile_From_Mac_Name()
>   as system-dependent. If configured for ATS only,
>   it will be incompatible with QuickDraw configuration.

Since I don't use a Mac, I have no opinion.  Hopefully, others can
comment.


 Werner


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-09-15 Thread Sean McBride
On 2005-09-15 12:11, [EMAIL PROTECTED] said:

>Finally I've finished benchmark testing of
>"Resolving QuickDraw FontName by ATS, without QuickDraw API".
>The result is summarized at:
>
>   http://www.gyve.org/~mpsuzuki/ats_benchmark.html

toshiya san,

I see you have done a lot of hard work!  I wish I knew more about fonts
and font APIs to help you, but I am clueless about these things.
However, the Mac programming community helps each other on several
mailing lists, and I do suggest you join these two:




You can ask QuickDraw/font/ATS questions on the carbon-dev list, and
people will definitely help you.

>In fact, in comparison with original QuickDraw API,
>it will be 20 times slower on Panther (Mac OS X 10.3),
>and 500 times slower on Cheetar (Mac OS X 10.0).

I wouldn't worry about 10.0, nobody uses it.  Anyone that has 10.0 can
upgrade to 10.1.5 for free.  (It's "Cheetah" BTW)

>Fix A:
>   FT_GetFile_From_Mac_Name() is kept for QuickDraw.
>   Add FT_GetFile_From_ATS_Name() for ATS.
>   To avoid "XXX is deprecated" warning,
>   FT_GetFile_From_Mac_Name() should be excluded in building.
>
>Fix B:
>   Change the behaviour of FT_GetFile_From_Mac_Name()
>   as system-dependent. If configured for ATS only,
>   it will be incompatible with QuickDraw configuration.

Well, I don't even use freetype (except via vtk) so I'm not sure my
opinion is important, but I think A sounds better.

--

Sean McBride, B. Eng [EMAIL PROTECTED]
Rogue Researchwww.rogue-research.com
Mac Software Developer  Montréal, Québec, Canada




___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-09-16 Thread mpsuzuki
Dear Sirs,

On Thu, 15 Sep 2005 12:11:15 +0900
[EMAIL PROTECTED] wrote:
>Fix A:
>   FT_GetFile_From_Mac_Name() is kept for QuickDraw.
>   Add FT_GetFile_From_ATS_Name() for ATS.
>   To avoid "XXX is deprecated" warning,
>   FT_GetFile_From_Mac_Name() should be excluded in building.
>
>Fix B:
>   Change the behaviour of FT_GetFile_From_Mac_Name()
>   as system-dependent. If configured for ATS only,
>   it will be incompatible with QuickDraw configuration.

On Thu, 15 Sep 2005 06:34:52 +0200 (CEST)
Werner LEMBERG <[EMAIL PROTECTED]> wrote:
>Since I don't use a Mac, I have no opinion.  Hopefully, others can
>comment.

On Thu, 15 Sep 2005 09:32:39 -0400
"Sean McBride" <[EMAIL PROTECTED]> wrote:
>Well, I don't even use freetype (except via vtk) so I'm not sure my
>opinion is important, but I think A sounds better.

Mr. Sean McBride and Mr. Werner LEMBERG, Thank you for comments.
I attach 2 patch of this issue.

migrate_fsspec2fsref.patch
This patch changes src/base/ftmac.c to use FSRef at maximum,
if TARGET_API_MAC_OS9 is not defined. Originally written by
Mr. George Williams and slightly modified by me.

migrate_qdfm2ats.patch
This patch adds FT_GetFile_From_Mac_ATS_Name() in
src/base/ftmac.c, which is an AppleTypeService-based
replacement of QuickDraw based FT_GetFile_From_Mac_Name(),
written by me. If "HAVE_QUICKDRAW" is set to false on the
future Mac OS X system without QuickDraw,
FT_GetFile_From_Mac_Name() is changed to a function that
returns error always. If "HAVE_ATS" is set to false on old
system without ATS, FT_GetFile_From_Mac_ATS_Name() will be
a function that returns error always.

Also a patch for configure.ac is attached to set HAVE_QUICKDRAW
and HAVE_ATS automatically, if --with-old-mac-fonts=yes.

At present, yet I've not finished macro hooking for MPW,
ProjectBuilder, Xcode and CodeWarriror.

By the way, thinking of ATS patch is written to remove deprecated
function, the 2nd argument of FT_GetFile_From_Mac_ATS_Name() should
be FSRef, than FSSpec? The current API is designed to be same with
FT_GetFile_From_Mac_Name(), for programmers' convenience.
But, FSSpec is deprecated data type, so I should propose different
function using no deprecated data? For example:

FT_GetFile_From_Mac_Name( const char*  fontName,
  FSRef*   pathRef,
  FT_Long* face_index)

# yet I'm not sure if the idea of "face" fits ATS font model.

Mr. Sean McBride (and anybody interested in this issue),
how do you think of?

Regards,
mpsuzuki


migrate_fsspec2fsref.patch
Description: Binary data


migrate_qdfm2ats.patch
Description: Binary data
___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2005-12-27 Thread mpsuzuki
Hi all,

Finally I post my jumbo patch to fix "deprecated function
XXX is used" issue on MacOS X 10.4, since 25/Aug/2005.

PROBLEM
---
You will see the warning when you build for Intel-based Mac,
aslike:

$ env \
  CC="i686-apple-darwin8-gcc-4.0.1 -isysroot /Developer/SDKs/MacOSX10.4u.sdk/" \
./configure \
  --with-old-mac-fonts \
  --host=i686-apple-darwin8 \
  --build=powerpc-apple-darwin8.3.0
...

$ make
...

In file included from /Users/mps/redhat/BUILD/freetype2/src/base/ftbase.c:35:
/Users/mps/redhat/BUILD/freetype2/src/base/ftmac.c: In function 
'FT_GetFile_From_Mac_Name':
/Users/mps/redhat/BUILD/freetype2/src/base/ftmac.c:150: warning: 
'FMCreateFontFamilyIterator' is deprecated (declared at 
/Developer/SDKs/MacOSX10.4u.sdk//System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/Fonts.h:573)
...


SOLUTION


After applying my jumbo patch to latest freetype2 (on CVS)
and recreate builds/unix/configure, it provides several
switches to use or ignore MacOS specific APIs.

  --with-fsspec   use obsolete FSSpec API of MacOS, if available
  (default=yes)
  --with-fsrefuse Carbon FSRef API of MacOS, if available
  (default=yes)
  --with-quickdraw-toolbox
  use MacOS QuickDraw in ToolBox, if available
  (default=yes)
  --with-quickdraw-carbon use MacOS QuickDraw in Carbon, if available
  (default=yes)
  --with-ats  use AppleTypeService, if available (default=yes)


By default, these switchs check availability automatically,
but you can set them explicitly.

If FSRef API is available (checked automatically), ftmac.c
uses FSRef API instead of deprecated FSSpec API, at maximum,
so "deprecated" warning about FSSpec won't appear.

On the other hand, even if QuickDraw APIs are deprecated,
the switchs detect them automatically, and use them for
FT_GetFile_From_Mac_Name(). To remove "deprecated" warning,
you have to set "--with-quickdraw-toolbox=no" and
"--with-quickdraw-carbon=no" manually. By disabling QuickDraw,
FT_GetFile_From_Mac_Name() is changed to pseudo function
which returns FT_Err_Unimplemented_Feature always.

Apple recommends to migrate from QuickDraw to ATS, but,
as I've ever reported, compatible function is hard to
implement and will be unbelievably slow. As a quick replacement,
I added FT_GetFile_From_Mac_ATS_Name() that returns FSSpec
(oops, it's obsolete!) for given ATS font name.

About the "abscondence" of font in migration from QuickDraw
to ATS, use my "ftoldmac" tool (see previous post in this
list).

By ftoldmac tool, I checked that the number of loadable
font files and loadable font faces are same with original
FreeType, on MacOS X 10.4.


TODO


* Tests on real System6 & 7.

  It seems that new QuickDraw APIs in Carbon (e.g.
  FMCreateFontFamilyIterator() etc) are not available
  on ToolBox library (say, System 7 environment)
  I classify 2 groups of QuickDraw FontManager APIs:
  "quickdraw-toolbox" is old API described in ancient
  "Inside Macintosh: Fonts". "quickdraw-carbon" is new
  API described in Carbon reference.

* On MacOS X, giving "--with-fsref=no" disables FreeType2
  to load most data-fork fonts

FreeType2 uses stdio functions to load font files. On
MacOS, there are several incompatible font access APIs:
FSSpec comes from FileManager, not from POSIX, so its
pathname separator is always ":". stdio in MPW's StdCLib
uses such syntax. But, on MacOS X, stdio comes from POSIX,
its pathname separator is "/". FSRef API has support
to work on both syntax, but FSSpec does not have.

Maybe you wish if there's regression test for all combination
of FSSpec|FSRef and QuickDraw|ATS. MacOS X might be best
platform for such automated regression test. Unfortunately
it's impossible, at present.

* Complete cleaning of FSSpec.

Apple recommends to migrate from FSSpec to FSRef, because
FSSpec cannot handle long file name and UTF-16 encoded
file name. But some Carbon functions are left in FSSpec-
dependent because there's no replacements.

* Unification with POSIX resource fork accessor.

Masatake Yamato wrotes resource fork accessor by POSIX
functions, to use resource-fork fonts on real UNIX system
that can access resource fork. To reduce the cost of
maintainance, unification is expected.

Regards,
mpsuzuki


freetype2_ftmac_jumbo.patch.bz2
Description: Binary data
___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2006-01-08 Thread Werner LEMBERG

> Finally I post my jumbo patch to fix "deprecated function
> XXX is used" issue on MacOS X 10.4, since 25/Aug/2005.

In case you patch is ready for inclusion into the CVS, please do so.


Werner


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2006-01-09 Thread mpsuzuki
Hi,

On Sun, 08 Jan 2006 14:36:04 +0100 (CET)
Werner LEMBERG <[EMAIL PROTECTED]> wrote:
>> Finally I post my jumbo patch to fix "deprecated function
>> XXX is used" issue on MacOS X 10.4, since 25/Aug/2005.
>
>In case you patch is ready for inclusion into the CVS, please do so.

OK, I will commit the patch to CVS (although I wish if
I could receive any comments by Sean).

I've grepped Xcode (Apple's official SDK based on gcc)
and applications on Mac OS X, and I could find no Apple
application that requires FT_GetFile_From_Mac_Name() or
FT_New_Face_From_FSSpec(), so I think my jumbo patch
won't cause severe problem.

I wrote detailed document about the deprecated function
issue (as a patch to builds/mac/README). In the document,
I refered my benchmarks of QuickDraw & ATSUI font name
resolver (to notice that it's hard to provide QuickDraw
compatible functions by ATS). If required, I can transfer
the document onto FreeType website.

Regards,
mpsuzuki


--- freetype2--official-maintrunk--0.1--patch-123/builds/mac/README 
2006-01-10 14:18:36.0 +0900
+++ freetype2-macos/builds/mac/README   2006-01-10 14:13:27.0 +0900
@@ -18,6 +18,9 @@
 However, Mac OS X is most useful to manipulate files in
 vanilla FreeType to fit classic MacOS.
 
+The information about MacOS specific API is written in
+appendix of this document.
+
 2. Requirement
 --
 
@@ -205,8 +208,190 @@
   to MPW. To update classic MacOS support easily,
   building by Jam is expected on MPW.
 
+
+APPENDIX I
+--
+
+  A-1. Framework dependencies
+  ---
+
+  src/base/ftmac.c adds two Mac-specific features to
+  FreeType. These features are based on MacOS libraries.
+
+  * accessing resource-fork font
+  The fonts for classic MacOS store their graphical data
+  in resource forks which cannot be accessed via ANSI C
+  functions. FreeType2 provides functions to handle such
+  resource fork fonts, they are based on File Manager
+  framework of MacOS.  Following functions are for this
+  purpose.
+
+FT_New_Face_From_Resource()
+FT_New_Face_From_FSSpec()
+FT_New_Face_From_FSRef()
+
+  * resolving font name to font file
+  The font menu of MacOS application prefers font name
+  written in FOND resource than sfnt resoure. FreeType2
+  provides functions to find font file by name in MacOS
+  application, they are based on QuickDraw Font Manager
+  and Apple Type Service framework of MacOS.
+
+FT_GetFile_From_Mac_Name()
+FT_GetFile_From_Mac_ATS_Name()
+
+  Working functions for each MacOS are summarized as
+  following.
+
+  upto MacOS 6:
+not tested (you have to obtain MPW 2.x)
+
+  MacOS 7.x, 8.x, 9.x (without CarbonLib):
+FT_GetFile_From_Mac_Name()
+FT_New_Face_From_Resource()
+FT_New_Face_From_FSSpec()
+
+  MacOS 9.x (with CarbonLib):
+FT_GetFile_From_Mac_Name()
+FT_New_Face_From_Resource()
+FT_New_Face_From_FSSpec()
+FT_New_Face_From_FSRef()
+
+  Mac OS X upto 10.4.x:
+FT_GetFile_From_Mac_Name() deprecated
+FT_New_Face_From_FSSpec()  deprecated
+FT_GetFile_From_Mac_ATS_Name() deprecated?
+FT_New_Face_From_FSRef()
+
+  A-2. Deprecated Functions
+  -
+
+A-2-1. FileManager
+--
+
+For convenience to write MacOS application, ftmac.c
+provides functions to specify a file by FSSpec and FSRef,
+because the file identification pathname had ever been
+unrecommended method in MacOS programming.
+
+Toward to MacOS X 10.4 & 5, Carbon functions using FSSpec
+datatype is noticed as deprecated, and recommended to
+migrate to FSRef datatype. The big differences of FSRef
+against FSSpec are explained in Apple TechNotes 2078.
+
+http://developer.apple.com/technotes/tn2002/tn2078.html
+
+- filename length: the max length of file
+name of FSRef is 255 chars (it is limit of HFS+),
+that of FSSpec is 31 chars (it is limit of HFS).
+
+- filename encoding: FSSpec is localized by
+legacy encoding for each language system,
+FSRef is Unicode enabled.
+
+A-2-2. FontManager
+--
+
+Following functions receive QuickDraw fontname:
+
+  FT_GetFile_From_Mac_Name()
+
+QuickDraw is deprecated and replaced by Quartz
+since Mac OS X 10.4. They are still kept for
+backward compatibility. By undefinition of
+HAVE_QUICKDRAW in building, you can change these
+functions to return FT_Err_Unimplemented always.
+
+Replacement functions are added for migration.
+
+  FT_GetFile_From_Mac_ATS_Name()
+
+They are usable on Mac OS X only. On older systems,
+these functions return FT_Err_Unimplemented always.
+
+The detailed incompatibilities and possibility
+of FontManager emulation without QuickDraw is
+explained in
+
+  http://www.gyve.org/~mpsuzuki/ats_benchmark.html
+
+  A-3. Framework Availabilities 
+  -
+
+  The framework of MacOS are often revised, especia

Re: [ft-devel] Freetype on Mac uses deprecated functions

2006-01-10 Thread Sean McBride
On 2006-01-10 14:34, [EMAIL PROTECTED] said:

>>> Finally I post my jumbo patch to fix "deprecated function
>>> XXX is used" issue on MacOS X 10.4, since 25/Aug/2005.
>>
>>In case you patch is ready for inclusion into the CVS, please do so.
>
>OK, I will commit the patch to CVS (although I wish if
>I could receive any comments by Sean).
>
>I've grepped Xcode (Apple's official SDK based on gcc)
>and applications on Mac OS X, and I could find no Apple
>application that requires FT_GetFile_From_Mac_Name() or
>FT_New_Face_From_FSSpec(), so I think my jumbo patch
>won't cause severe problem.

I only use freetype indirectly by using vtk.  I have checked the vtk
source and it uses neither of those two functions.

You work looks great, thanks!

--

Sean McBride, B. Eng [EMAIL PROTECTED]
Rogue Researchwww.rogue-research.com
Mac Software Developer  Montréal, Québec, Canada




___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Freetype on Mac uses deprecated functions

2006-01-11 Thread mpsuzuki
Hi,

Sean, Thank you for comment!
Just I've commited my jumbo patch to CVS.

On Tue, 10 Jan 2006 11:47:53 -0500
"Sean McBride" <[EMAIL PROTECTED]> wrote:

>On 2006-01-10 14:34, [EMAIL PROTECTED] said:
>
 Finally I post my jumbo patch to fix "deprecated function
 XXX is used" issue on MacOS X 10.4, since 25/Aug/2005.
>>>
>>>In case you patch is ready for inclusion into the CVS, please do so.
>>
>>OK, I will commit the patch to CVS (although I wish if
>>I could receive any comments by Sean).
>>
>>I've grepped Xcode (Apple's official SDK based on gcc)
>>and applications on Mac OS X, and I could find no Apple
>>application that requires FT_GetFile_From_Mac_Name() or
>>FT_New_Face_From_FSSpec(), so I think my jumbo patch
>>won't cause severe problem.
>
>I only use freetype indirectly by using vtk.  I have checked the vtk
>source and it uses neither of those two functions.


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel