[Fontconfig] Questionable usage of FcPatternAddInteger()

Fabian Greffrath fabian at greffrath.com
Mon Apr 30 01:11:26 PDT 2012

Hi Raimund and Akira,

Am 28.04.2012 18:06, schrieb Raimund Steger:
> I believe Akira is right, I just checked in the source of
> cups-filters-1.0.16 that is mentioned in the original bug report and
> it seems that like in your example, trim is enabled in texttopdf.c:67,
> which is not a very good idea because -- depending on the fontconfig
> configuration -- the first font that satisfies the application's
> requirement might appear further down the list.

thanks for your insightful replies. I believe I have understood the 
issue a bit better now.

So as you both point out, the culprit is not necessarily 
FcPatternAddInteger() but the trimming of FcFontSort()'s results, 
which may cause dropping of some reasonable candidates.

> (I'm also not too positive about passing 0 as pointer to 'result'. Is
> that allowed for FcFontSort()?)

Is it fine to pass NULL instead of 0 or does it have to be an actual 

  - Fabian

More information about the Fontconfig mailing list