
Jon A. Cruz wrote:
That's where I think a better ifdef scheme is needed. We probably should try to get to that ASAP as it's not just hypothetically better, but would help with subtle bugs we're encountering already.
Basically, the problem is compounded by mixing platform checks with feature checks. I'm a strong proponent of all platform checks belonging only in config.h. Anything else should use feature checks in the code instead.
#ifdef USE_XFT ...code... #elif defined(USE_WIN32_FNT) ...code... #else #warning "Unsupported platform" #endif
Notice the switch from the platform define to a USE_ one, and also the default case being added (though I think that "#warning" is gcc only...)
I agree. It is so easy to forget why there is an #ifdef WIN32 in the code in the first place. This last week's episode of "Pangoification, Part II" is a good example.
This is somewhat moot for libnrtype, since the pango_win32* sections of the Pango code are disappearing. (They were out of sync with the FT2 code anyway).
Bob