On 15 Sep 2004 11:17:10 -0400, you wrote:
Tested on both freetype 2.1.2 and freetype 2.1.4.
Changelog: Use the preferred FT_ENCODING values rather than ft_encoding.
+#ifndef FT_ENCODING_NONE +#define FT_ENCODING_NONE ft_encoding_none +#endif +#ifndef FT_ENCODING_MS_SYMBOL +#define FT_ENCODING_MS_SYMBOL ft_encoding_symbol +#endif +#ifndef FT_ENCODING_UNICODE +#define FT_ENCODING_UNICODE ft_encoding_unicode +#endif +#ifndef FT_ENCODING_APPLE_ROMAN +#define FT_ENCODING_APPLE_ROMAN ft_encoding_apple_roman +#endif
The patch works, but is not quite correct and doing the opposite of what you claim: the FT_ENCODING's are never defined but are enums. Therefore "ifndef FT_ENCODING_XYZ" is always true and you always use the depreciated ft_encodings.
On old freetype2:
enum FT_Encoding { ft_encoding_xyz, ...
On Newer freetype2:
enum FT_Encoding { FT_ENCODING_XYZ, ...
#define ft_encoding_xyz FT_ENCODING_XYZ
So to use FT_ENCODING_XYZ in the code and still compile with older freetype2's, we need to test:
#ifndef ft_encoding_xyz
Patch attached, tested to compile with freetype 2.0.9 and 2.1.7.
Changelog: dlls/gdi : freetype.c Test whether the ft_encoding's are defined, not the FT_ENCODING's.
Rein.