Bug 11

Summary: Matching the same patern with FC_SLANT does not match the FC_STYLE equivalent.
Product: fontconfig Reporter: Chema Celorio <chema>
Component: libraryAssignee: Keith Packard <keithp>
Severity: enhancement    
Priority: high    
Version: 2.1   
Hardware: x86 (IA32)   
OS: All   
i915 platform: i915 features:
Bug Depends on: 108283    
Bug Blocks:    
Attachments: sample code

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):

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 1 Chema Celorio 2003-01-18 19:13:31 UTC
Created attachment 10 [details]
sample code
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


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.