|Summary:||Matching the same patern with FC_SLANT does not match the FC_STYLE equivalent.|
|Product:||fontconfig||Reporter:||Chema Celorio <chema>|
|Component:||library||Assignee:||Keith Packard <keithp>|
|Status:||RESOLVED WONTFIX||QA Contact:|
|i915 platform:||i915 features:|
|Bug Depends on:||108283|
Description Chema Celorio 2003-01-18 19:12:47 UTC
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): /usr/X11R6/lib/X11/fonts/Type1/l048013t.pfa /usr/X11R6/lib/X11/fonts/Type1/l048033t.pfa 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 1: /usr/X11R6/lib/X11/fonts/Type1/l048013t.pfa 2: /usr/X11R6/lib/X11/fonts/Type1/l048033t.pfa [chema@lamark bug]$ 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.
Comment 2 Keith Packard 2003-01-18 19:56:01 UTC
FC_STYLE is nominally informative rather than instructive; attempting to perform any kind of string "nearness" metric from the range of possible font styles seems impractical.
Comment 3 Chema Celorio 2003-01-18 20:05:04 UTC
Then it might be a documentation bug. man fontconfig says: style FC_STYLE String Font style. Overrides weight and slant reopen?