[PATCH] gdi32: Fix compile error with Fontconfig <= 2.10.91.

Huw Davies huw at codeweavers.com
Tue Dec 18 03:35:14 CST 2018


On Tue, Dec 18, 2018 at 11:29:20AM +0300, Nikolay Sivov wrote:
> > +#ifdef FC_NAMELANG
> >       r = pFcPatternAddString(pat, FC_NAMELANG, (const FcChar8 *)"en-us");
> >       if (!r) goto end;
> > +#endif
> > +#ifdef FC_PRGNAME
> >       r = pFcPatternAddString(pat, FC_PRGNAME, (const FcChar8 *)"wine");
> >       if (!r) goto end;
> > +#endif
> If these parameters are not essential, you can use numeric values instead,
> remove error checking and ifdef-ing, so it works the same way regardless of
> where it was built.

I think something like:

#ifndef FC_NAMELANG
#define FC_NAMELANG "namelang"
#endif
#ifndef FC_PRGNAME
#define FC_PRGNAME "prgname"
#endif

put after fontconfig's "MAKE_FUNCPTR"s would be the cleanest way.

But yes, what happens when run with an old version of the library;
does FcPatternAddString() return an error or it is ignored, and does
that make the resulting font useful or not?

Huw.



More information about the wine-devel mailing list