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

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



In message <5056CBC646CB4047BB26120F4377DB7179A7BF@xxxxxxxxxxxxxxxxxxx 
>
          "Luke Hart" <LukeH@xxxxxxxx> wrote:

>> 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. :-(
>
> The change happened between v1.46 and v1.47 of ftimage.h (see
> http://cvs.savannah.nongnu.org/viewcvs/freetype2/include/freetype/ftim
> age.h?root=freetype&r1=1.46&r2=1.47). 1.47 is the version include with
> all the release candidates of FT2.2, so basically anything after that
> point will be broken.

Thanks. I just found the corresponding entry in the ChangeLog. There 
is no explanation why they thought it necessary to change it but it 
says: "The next release will be 2.2.0, so do not worry about source 
code backwards compatibility". Oh well, that means it is not an 
oversight, but deliberate. I cannot understand why they did that, 
there was no need to break the interface.

I will add some conditional code to make it work with either release.

Martin