View previous topic :: View next topic |
Author |
Message |
evoweiss Veteran
Joined: 07 Sep 2003 Posts: 1678 Location: Edinburgh, UK
|
Posted: Tue Oct 01, 2013 7:59 pm Post subject: Fontconfig error invalid attribute 'name' [solved] |
|
|
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 |
|
|
netixen n00b
Joined: 26 Sep 2013 Posts: 31
|
Posted: Wed Oct 02, 2013 7:09 am Post subject: |
|
|
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 |
|
|
PaulBredbury Watchman
Joined: 14 Jul 2005 Posts: 7310
|
Posted: Wed Oct 02, 2013 11:27 am Post subject: |
|
|
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 |
|
|
evoweiss Veteran
Joined: 07 Sep 2003 Posts: 1678 Location: Edinburgh, UK
|
Posted: Wed Oct 02, 2013 3:56 pm Post subject: |
|
|
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 |
|
|
PaulBredbury Watchman
Joined: 14 Jul 2005 Posts: 7310
|
Posted: Wed Oct 02, 2013 6:59 pm Post subject: |
|
|
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 |
|
|
|