The SmallCaps variant of the Delicious font does not show up in the GTK+ Font selection dialog (the regular version is shown), although "Delicious-SmallCaps.otf" really contains the correct glyphs. The font I'm talking about is available free of charge at: http://www.josbuivenga.demon.nl/delicious.html
On my system, it shows up as 'Delicious SmallCaps' (a separate font). Is that what you get?
Hmm, strange. I can't reproduce anymore. However, I'm pretty sure I saw this happening yesterday (just after installing the fonts; I just copied them over to ~/.fonts/ and did not run fc-cache). I wouldn't have taken the time to file bug if I wasn't absolutely sure ;-) Leaving this open for a while. I'll comment if I see the problem again. Thanks for looking into it.
I didn't run fc-cache either. If you see the bug again, try to see if it shows up in fc-list. Oh, I probably ran fc-list first, which will update the .fonts.cache-2 file in my home directory. Try removing cache files and seeing if you get the bug.
Removing the font caches didn't have any effect. This is is pretty strange though: elin:~ > fc-match "Delicious" Delicious-Heavy.otf: "Delicious" "Heavy" elin:~ > fc-match "Delicious Regular" MyriadWebPro.ttf: "Myriad Web Pro" "Regular" elin:~ > fc-match "Delicious Roman" MyriadWebPro.ttf: "Myriad Web Pro" "Regular"
Created attachment 5514 [details] gtk font chooser showing wrong Delicious Look at this shot: 2 "Regular styles" show up and neither Roman nor Regular show the correct font (while the fontilus preview of the .otf file does).
fc-list |grep Delicious Delicious:style=Bold Delicious SmallCaps,Delicious:style=Regular,SmallCaps Delicious:style=Italic Delicious Heavy,Delicious:style=Regular,Heavy Delicious:style=Roman Delicious:style=BoldItalic
As requested on IRC: fc-list : file family |grep -i Delicious /home/uws/.fonts/Jos Buivenga/Delicious-Bold.otf: Delicious /home/uws/.fonts/Jos Buivenga/Delicious-Roman.otf: Delicious /home/uws/.fonts/Jos Buivenga/Delicious-Heavy.otf: Delicious Heavy,Delicious /home/uws/.fonts/Jos Buivenga/Delicious-Italic.otf: Delicious /home/uws/.fonts/Jos Buivenga/Delicious-BoldItalic.otf: Delicious /home/uws/.fonts/Jos Buivenga/Delicious-SmallCaps.otf: Delicious SmallCaps,Delicious
fc-list : file family style |grep -i Delicious /home/uws/.fonts/Jos Buivenga/Delicious-Italic.otf: Delicious:style=Italic /home/uws/.fonts/Jos Buivenga/Delicious-Heavy.otf: Delicious Heavy,Delicious:style=Regular,Heavy /home/uws/.fonts/Jos Buivenga/Delicious-BoldItalic.otf: Delicious:style=BoldItalic /home/uws/.fonts/Jos Buivenga/Delicious-Bold.otf: Delicious:style=Bold /home/uws/.fonts/Jos Buivenga/Delicious-Roman.otf: Delicious:style=Roman /home/uws/.fonts/Jos Buivenga/Delicious-SmallCaps.otf: Delicious SmallCaps,Delicious:style=Regular,SmallCaps
I see the SmallCaps and Heavy variants as separate fonts, but they both include two family names and two style names. The first family name has the style included (Delicious SmallCaps) while the first style name is Regular. The second family name is generic (Delicious) while the second style name indicates the variant (SmallCaps). I'm not sure how to resolve this; most fonts don't have an implicit ordering dependency between the family and style names.
Fwiw, my current fontconfig/gtk+ HEAD build shows me: - Delicious - Roman * - Regular * - Regular * - Italic - Bold - Delicious Heavy - Regular * - Delicious SmallCaps - Regular The font names marked with a * all show the exact same preview, which is the "Delicious Heavy Regular" font (which is slightly bolder than the "Delicious Bold" variant). It's impossible to select the 'normal' Delicious font.
Ok, I think I understand the problem. These fonts have names for three 'platforms' (in TrueType speak): 1: Apple 'unicode' names 2: Apple legacy names 3: Microsoft names For each platform, they contain family, style and fullname entries. For both Apple platforms, they use sensible names (e.g.): family: Delicious style: Heavy fullname: Delicious-Heavy The names on the Microsoft platform are broken: family: Delicious Heavy style: Regular fullname: Delicious-Heavy I think we want to leave the Microsoft names out of the configuration and use only the Apple names -- it's the Microsoft style name that's breaking things here.
Further investigation uncovers the fact that Delicious Heavy registers itself as a 'normal weight' font in the os2 table. So, we're left with a font which: Says it's family is 'Delicious' (or 'Delicious Heavy') Says it's style is 'Regular' (or 'Heavy') Says it's weight is Medium I'm not sure how I'm supposed to detect that this font isn't a good match for a request asking for a regular font in the Delicous family, other than having a special case for this particular font (which is clearly broken, as it registers the wrong weight). I'd prefer not to go the Microsoft route and stick all style variants in the font menu; that seems wrong. I suspect the right plan here is to allow us to add rules to edit the constructed pattern for each font so that we can fix things like this in an extensible fashion.
Well, that was certainly easier than I had feared. I've added a new match target (scan) which affects fonts as they're scanned into the database. A new configuration file 60-delicious.conf was added that takes the heavy variant and adjusts the weight from medium to heavy, causing it to be correctly matched as a heavy font. I also added a match predicate for 'decorative' fonts so that 'normal' fonts are preferred unless the decorative style name is supplied. This fixes false matches on the Decorative SmallCaps face.
Keith, thanks for looking into this issue. Is your patch in CVS yet? I don't know which fontconfig branch I should use (I'm using fc-2_4_branch right now) to track "head" development...
Yes, the patch is in the GIT repository (fontconfig moved last weekend) and is available on the fc-2_4-keithp branch. I'll be merging that to master this week if I can get a few more people to give it a try.
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.