[Fontconfig] Regularizing contains operator semantics

Keith Packard keithp at keithp.com
Sat Jul 12 14:02:07 PDT 2003


Around 14 o'clock on Jul 12, Owen Taylor wrote:

> What about in <match><test>? What does 
> 
>  <string>times,courier</string>
>  <lang>en,de</lang>
> 
> Mean there? If it means "an embedded comma" then I would suggest
> that fontconfig should probably print a warning like:

Sigh.  Yes, it means an embedded comma; only the string name parser 
(FcNameParse) splits things at punctuation.  This is useful for '-' where
<string>sans-serif</string> means the sans-serif family and not the sans 
family at size 'serif'.

If you want to check for any of a list, you can have multiple values in the
<test> case:

	<test name="family" qual=any>
		<string>times</string>
		<string>courier</string>
	</test>

That will look for either 'times' or 'courier'.

Or, you can use:

	<test name="lang" qual=all>
		<string>en</string>
		<string>de</string>
	</test>

to check for both en and de.

I'd prefer to not emit warnings for reasonable syntax; I'm not sure how
one would rewrite the values to avoid the warnings which seems pretty 
harsh.

-keith





More information about the Fontconfig mailing list