Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fontconfig error invalid attribute 'name' [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
evoweiss
Veteran
Veteran


Joined: 07 Sep 2003
Posts: 1576
Location: Edinburgh, UK

PostPosted: Tue Oct 01, 2013 7:59 pm    Post subject: Fontconfig error invalid attribute 'name' [solved] Reply with quote

Hi all,

Some odd behavior has cropped up recently with fontconfig. It never presented a problem before now.

Anyway, when I load something like, say, firefox, from the console I get the following error message:

Code:

Fontconfig error: "/home/username/.config/fontconfig/fonts.conf", line 11: invalid attribute 'name'


The relevant bit of code is as follows:

Code:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Info at http://gentoo-wiki.com/HOWTO_Xorg_and_Fonts --><!-- Replace Courier with a better-looking font --> <match target="pattern" name="family" >
  <test name="family" qual="any" >
   <string>Courier</string>
  </test>
  <edit mode="assign" name="family" >
<!-- Other choices - Courier New, Luxi Mono -->   <string>Bitstream Vera Sans Mono</string>
  </edit>
 </match>


Does anybody have any notion as to what is going on here?

Best,

Alex


Last edited by evoweiss on Wed Oct 02, 2013 3:56 pm; edited 1 time in total
Back to top
View user's profile Send private message
netixen
n00b
n00b


Joined: 26 Sep 2013
Posts: 31

PostPosted: Wed Oct 02, 2013 7:09 am    Post subject: Reply with quote

Hi,

Code:
<match target=pattern>
This element holds first a (possibly empty) list of <test> elements and then a (possibly empty) list of <edit> elements. Patterns which match all of the tests are subjected to all the edits. If 'target' is set to "font" instead of the default "pattern", then this element applies to the font name resulting from a match rather than a font pattern to be matched.


So adjust <match> accordingly

Best,
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Wed Oct 02, 2013 11:27 am    Post subject: Reply with quote

Can use e.g.:

Code:
    <match>
        <test name="family"><string>Helvetica</string></test>
        <edit mode="assign" name="family" binding="strong"><string>Liberation Sans</string></edit>
    </match>

_________________
Improve your font rendering and ALSA sound
Back to top
View user's profile Send private message
evoweiss
Veteran
Veteran


Joined: 07 Sep 2003
Posts: 1576
Location: Edinburgh, UK

PostPosted: Wed Oct 02, 2013 3:56 pm    Post subject: Reply with quote

PaulBredbury wrote:
Can use e.g.:

Code:
    <match>
        <test name="family"><string>Helvetica</string></test>
        <edit mode="assign" name="family" binding="strong"><string>Liberation Sans</string></edit>
    </match>


Hi both of you... I managed to solve the problem thanks to your help. I didn't need to change the font in question, so I omitted the lines. I am not sure why they were included in the first place and why it's just now that they became problematic.

Best,

Alex
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Wed Oct 02, 2013 6:59 pm    Post subject: Reply with quote

That rule was made (by me) because it took ages to find a Courier font I was happy with. I currently use:

Code:
    <match>
        <test name="family"><string>Courier</string></test>
        <edit mode="assign" name="family" binding="strong">
            <string>Courier Prime</string>
        </edit>
    </match>


Of course, fontconfig can only choose from the fonts that are actually installed.

As freetype improves, some of the fontconfig rules become obsolete.

Fontconfig has become fussier, mainly to reduce ambiguity/confusion in what the rules accomplish, which is why fontconfig moans about what it used to accept.
_________________
Improve your font rendering and ALSA sound
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum