freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] freetype2 FT_FREETYPE_H macro bug


From: jonathan . foster
Subject: Re: [Devel] freetype2 FT_FREETYPE_H macro bug
Date: Fri, 28 Feb 2003 10:42:10 +0000

Tim Seufert <address@hidden> wrote:
> Freetype2 defines FT_FREETYPE_H as follows:
>
> #define FT_FREETYPE_H  <freetype/freetype.h>
>
> On systems which have both freetype and freetype2 installed, if the
> header search path contains the *parent* dir of the freetype header dir
> *before* it lists the freetype2 header dir, this will lead to inclusion
> of the freetype1 freetype.h file.

I hit this bug earlier this week, too.

Is there a reason why the directory is called "freetype" rather than
"freetype2"?  Since apps are supposed to always use the macros, it
should be possible to rename it without breaking backwards compatibility.

Also, if the directory is renamed then we could get rid of the requirement
to have an extra include directory on the compiler's include path (i.e. 'gcc
-I/usr/include/freetype2' so it can find 
/usr/include/freetype2/freetype/freetype.h)
by simply putting the includes one level up (i.e. 
/usr/include/freetype2/freetype.h).
This would make it easier for applications to find the FreeType2 headers.

Kind regards,

Jon Foster
--



                                                                                
                                                       
                                                                                
                                                       
                                                   To:   address@hidden         
                                                   
                                                   cc:   (bcc: Jonathan 
Foster/RED/RESEARCH/PHILIPS)                                   
                                                   Subject:    [Devel] 
freetype2 FT_FREETYPE_H macro bug                               
                                                                                
                                                       
               Tim Seufert                         Classification:              
                                                       
               <address@hidden>                                                 
                                                   
                                                                                
                                                       
               Sent by:                                                         
                                                       
               address@hidden                                                   
                                             
                                                                                
                                                       
               12/02/2003 11:10 pm                                              
                                                       
               Please respond to devel                                          
                                                       
                                                                                
                                                       
                                                                                
                                                       




Freetype2 defines FT_FREETYPE_H as follows:

#define FT_FREETYPE_H  <freetype/freetype.h>

On systems which have both freetype and freetype2 installed, if the
header search path contains the *parent* dir of the freetype header dir
*before* it lists the freetype2 header dir, this will lead to inclusion
of the freetype1 freetype.h file.

What a mouthful.  Hopefully this will be more clear:

test.cpp:
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_CACHE_H
(etc.)

g++ -I/sw/include -I/sw/include/freetype2 -c test.cpp

result: massive b0rkenness because FT_FREETYPE_H ends up grabbing
/sw/include/freetype/freetype.h instead of
/sw/include/freetype2/freetype/freetype.h.

Yes, this really happened to me, while I was trying to port a package
to Fink on MacOS X (thus the /sw/include dir instead of
/usr/local/include, but I don't see why it wouldn't affect
/usr/local/include too).

Please cc me with any responses as I'm not subscribed to the ft2 devel
list.


_______________________________________________
Devel mailing list
address@hidden
http://www.freetype.org/mailman/listinfo/devel







reply via email to

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