Matching a patern with FC_SLANT_ITALIC returns a different result than the same
query if done with a FC_STYLE="Italic".
On a system with only two fonts (or a stock Redhat8.0 system with all of its fonts):
with the default /etc/fonts/fonts.conf file from RedHat 8.0 returns a different
result with the attached code. "Oblique" is not closer than "Regular" to
"Italic" if matched with strings, with integers the expected behaviour occurs.
Sample code attached. When ran, I get this results:
[chema@lamark bug]$ ./sample
I've worked around this bug on my code and I don't need the fix since it seems
better to me to match by integers anyways, but I still wanted to file the bug.
Created attachment 10 [details]
FC_STYLE is nominally informative rather than instructive; attempting to perform
any kind of string "nearness" metric from the range of possible font styles
Then it might be a documentation bug.
man fontconfig says:
style FC_STYLE String Font style. Overrides weight and slant