Frank Murphy
2005-Nov-21 08:50 UTC
[Fontconfig] Nimbus Sans Condensed being selected over Nimbus Sans
> > How do I specify this in .fonts.conf. <prefer> only sems to work with > > font familes, not styles. > > You could add a specific style name to the pattern, but you''d have to be > very careful as it will compare the whole string. Look over the match/edit > rules in the fontconfig user documentation (linked from the > http://fontconfig.org page)So I tried this: <match target="pattern"> <test qual="any" name="style" compare="not_eq"> <string>Regular</string> </test> <edit name="style" mode="assign_replace"> <string>Regular</string> </edit> </match> Just hoping to always get Regular, as a start. How can I debug that this is doing anything? Running fc-cache will parse the file (and complain when I do something wrong.) But the KDE look is still condensed. Thanks, Frank
Frank Murphy
2005-Nov-21 08:50 UTC
[Fontconfig] Nimbus Sans Condensed being selected over Nimbus Sans
So I''m still trying to resolve the fact that "Nimbus Sans L:style=Regular Condensed" is being selected over "Nimbus Sans L:style=Regular". I''ve put the following in my .fonts.conf and run fc-cache -f: <?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <match target="pattern"> <test qual="any" name="style"> <string>Regular Condensed</string> </test> <edit name="style" mode="assign"> <string>Regular</string> </edit> </match> </fontconfig> When I run abiword, any text that I type in the editor and select as Nimbus Sans L selects the non-condensed (regular) version. However, all the gtk widgets have the Condensed version. I''ve tried running with FC_DEBUG=5, but I can''t understand what I''m seeing. Is this some situation where gtk is requesting "sans" and in the substitutions, my overwrite of Regular Condensed is being lost? I''m not sure what GTK is asking for here, and my problem also extends thoughout KDE as well. Thanks for any help, Frank
Keith Packard
2005-Nov-21 08:50 UTC
[Fontconfig] Nimbus Sans Condensed being selected over Nimbus Sans
Around 17 o''clock on Apr 24, Frank Murphy wrote:> With KDE on Debian sid, all the "helvetica" fonts are grabbing Nimbus Sans, > as expected. However, it is grabbing Nimbus Sans:style=Regular Condesed. > I''d prefer Nimbus Sans:style=Regular if condensed isn''t requested.Type1 fonts don''t appear to include a field specifically indicating the width of the font (normal, condensed, etc). This makes it hard to select the right font in this case. The best solution would be to modify fontconfig to try and extract width information from the style field. This would then let fontconfig''s normal pattern matching prefer the regular width font.> How do I specify this in .fonts.conf. <prefer> only sems to work with font > familes, not styles.You could add a specific style name to the pattern, but you''d have to be very careful as it will compare the whole string. Look over the match/edit rules in the fontconfig user documentation (linked from the http://fontconfig.org page) -keith
Frank Murphy
2005-Nov-21 08:50 UTC
[Fontconfig] Nimbus Sans Condensed being selected over Nimbus Sans
With KDE on Debian sid, all the "helvetica" fonts are grabbing Nimbus Sans, as expected. However, it is grabbing Nimbus Sans:style=Regular Condesed. I''d prefer Nimbus Sans:style=Regular if condensed isn''t requested. How do I specify this in .fonts.conf. <prefer> only sems to work with font familes, not styles. Thanks, Frank