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

Re: [XaraXtreme-dev] Compile error with freetype-2.2.1



In message <44721FFE.30106@xxxxxx>
          Indy500 <indy5001@xxxxxx> wrote:

> since I installed freetype-2.2.1 (Debian SID), Xara doesn't compile
> anymore. It breaks here:

> ftfonts.cpp: In static member function »static BOOL
> FTFontMan::GetCharOutline(CharDescription&, DocCoord**, PathVerb**,
> UINT32*, wxDC*)«:
> ftfonts.cpp:1217: Fehler: ungültige Umwandlung von »int (*)(FT_Vector*,
> void*)« in »int (*)(const FT_Vector*, void*)«
> ftfonts.cpp:1217: Fehler: ungültige Umwandlung von »INT32
> (*)(FT_Vector*, void*)« in »int (*)(const FT_Vector*, void*)«
> ftfonts.cpp:1217: Fehler: ungültige Umwandlung von »INT32
> (*)(FT_Vector*, FT_Vector*, void*)« in »int (*)(const FT_Vector*, const
> FT_Vector*, void*)«
...

Thanks. Unfortunately, that indicates that the FreeType people have 
changed the interface in an incompatible way. Very strange. Such 
things are usually avoided like the plague, and in this case, it is 
even stranger because the change is only cosmetic anyway.

As far as I can see, this change is bound to break all existing code 
using outline conversion, and, what is even more infuriating, for no 
apparent gain. I guess, someone went over the top when going through 
all the code and making pointer parameters "const". In library 
functions this is backward compatible, but not when defining the 
signatures of callback functions.

This is very sad because it means there is no way to write code that 
works for both FreeType 2.1 and 2.2 - I will have to introduce nasty 
#ifdefs to accomodate the two conflicting interfaces. Even worse, we 
do not even know yet in which precise version the change was made. :-(

Martin