[Fontconfig] font matching doesn't work for me

Tomasz Grobelny grotk at poczta.onet.pl
Fri Jul 18 09:48:43 EST 2003

On śro 16. lipca 2003 19:25, Tomasz Grobelny wrote:
> On śro 16. lipca 2003 14:51, Tomasz Grobelny wrote:
> > value.type=FcTypeString;
> > value.u.s=_family.ascii();
> > FcPatternAdd(pat, FC_FAMILY, value, true);
> This certainly could be done better: I've just discovered FcPatterAdd<Type>
Now the code looks like this:

	FcPatternAddString(pat, FC_FAMILY, _family.ascii());
	FcPatternAddBool(pat, FC_SCALABLE, FcTrue);
	FcPatternAddBool(pat, FC_OUTLINE, FcTrue);
	FcPatternAddInteger(pat, FC_WEIGHT, _weight);
	FcPatternAddInteger(pat, FC_SLANT, _slant);
	FcPatternAddDouble(pat, FC_SIZE, _size);

	FcConfigSubstitute(FcConfigGetCurrent(), pat, FcMatchPattern);
	FcResult result;
	font=FcFontMatch(FcConfigGetCurrent(), pat, &result);

	FcValue v;
	FcPatternGet(font, FC_FILE, 0, &v);

But the output is (for "Times"):
so it is a non scalable, non outline font (I was requesting quite the 
opposite). Why is that so?


More information about the Fontconfig mailing list