Bug 11 - Matching the same patern with FC_SLANT does not match the FC_STYLE equivalent.
Summary: Matching the same patern with FC_SLANT does not match the FC_STYLE equivalent.
Status: RESOLVED WONTFIX
Alias: None
Product: fontconfig
Classification: Unclassified
Component: library (show other bugs)
Version: 2.1
Hardware: x86 (IA32) All
: high enhancement
Assignee: Keith Packard
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: q
Blocks:
  Show dependency treegraph
 
Reported: 2003-01-18 19:12 UTC by Chema Celorio
Modified: 2018-10-09 05:39 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
sample code (1020 bytes, text/plain)
2003-01-18 19:13 UTC, Chema Celorio
Details

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

reopen?


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.