View previous topic :: View next topic |
Author |
Message |
epsilon72 Guru
Joined: 20 Sep 2007 Posts: 568
|
Posted: Thu Aug 12, 2010 7:44 am Post subject: Fontconfig error: junk after document ele[SOLVED-WORKAROUND] |
|
|
I get this error whenever I start almost any X application:
Code: |
Fontconfig error: "local.conf", line 9: junk after document element
|
Code: |
$ cat /etc/fonts/local.conf
<!-- Replace Helvetica with DejaVu Sans -->
<match target="pattern" name="family">
<test name="family" qual="any"><string>Helvetica</string></test>
<edit name="family" mode="assign">
<string>DejaVu Sans</string>
</edit>
</match>
<!-- Replace Lucida with DejaVu Sans -->
<match target="pattern" name="family">
<test name="family" qual="any"><string>Lucida</string></test>
<edit name="family" mode="assign">
<string>DejaVu Sans</string>
</edit>
</match>
<!-- Replace Times with DejaVu Serif -->
<match target="pattern" name="family">
<test name="family" qual="any"><string>Times</string></test>
<edit name="family" mode="assign">
<string>DejaVu Serif</string>
</edit>
</match>
|
What's wrong with line 9?
Code: |
<match target="pattern" name="family">
|
Last edited by epsilon72 on Fri Aug 20, 2010 8:25 am; edited 1 time in total |
|
Back to top |
|
|
BradN Advocate
Joined: 19 Apr 2002 Posts: 2391 Location: Wisconsin (USA)
|
Posted: Thu Aug 12, 2010 8:25 am Post subject: |
|
|
Doesn't make sense, there's not even a document element Is there another local.conf somewhere??
Maybe try starting a program under strace and see if it's accessing a different file. |
|
Back to top |
|
|
epsilon72 Guru
Joined: 20 Sep 2007 Posts: 568
|
Posted: Sat Aug 14, 2010 8:42 pm Post subject: |
|
|
The only "local.conf" font file I have is the one in the first post (I searched for "local.conf" using locate)
I did find out that if I only have one <match> section in the file, the applications don't complain about it. If I only have one section, however, I can't have all of the ugly fonts replaced that I want to. |
|
Back to top |
|
|
BradN Advocate
Joined: 19 Apr 2002 Posts: 2391 Location: Wisconsin (USA)
|
Posted: Sat Aug 14, 2010 9:17 pm Post subject: |
|
|
How does it behave if you merge the match sections into one? Definitely not the right syntax but depending how the parser works it might do the job.
Otherwise, sounds like bug reporting time. |
|
Back to top |
|
|
epsilon72 Guru
Joined: 20 Sep 2007 Posts: 568
|
Posted: Sun Aug 15, 2010 7:27 am Post subject: |
|
|
BradN wrote: | How does it behave if you merge the match sections into one? Definitely not the right syntax but depending how the parser works it might do the job.
Otherwise, sounds like bug reporting time. |
How would I merge them into one? I tried:
Code: |
<!-- Replace Helvetica with DejaVu Sans -->
<match target="pattern" name="family">
<test name="family" qual="any"><string>Helvetica</string></test>
<edit name="family" mode="assign">
<string>DejaVu Sans</string>
</edit>
<test name="family" qual="any"><string>Lucida</string></test>
<edit name="family" mode="assign">
<string>DejaVu Sans</string>
</edit>
<test name="family" qual="any"><string>Times</string></test>
<edit name="family" mode="assign">
<string>DejaVu Serif</string>
</edit>
</match>
|
..and I didn't get any errors, but only the first font replacement worked; the other two were ignored.
This isn't a big deal because it doesn't affect the functioning of any programs, nevertheless there is something amiss here. |
|
Back to top |
|
|
BradN Advocate
Joined: 19 Apr 2002 Posts: 2391 Location: Wisconsin (USA)
|
Posted: Sun Aug 15, 2010 8:33 pm Post subject: |
|
|
Yeah, that was what I was thinking. Oh well, it was worth a shot. |
|
Back to top |
|
|
epsilon72 Guru
Joined: 20 Sep 2007 Posts: 568
|
Posted: Fri Aug 20, 2010 8:23 am Post subject: |
|
|
I haven't found a solution to the "Fontconfig error" problem with three font family replacements, but I have managed to render that issue moot.
It turns out that the real problem was with the Helvetica bitmapped font. If I just include the lines
Code: |
<!-- Replace Helvetica with DejaVu Sans -->
<match target="pattern" name="family">
<test name="family" qual="any"><string>Helvetica</string></test>
<edit name="family" mode="assign">
<string>DejaVu Sans</string>
</edit>
</match>
|
in my /etc/fonts/local.conf, I don't get any errors, because it's just one match/family.
However, I've found out that the local.conf file above isn't even needed:
Code: |
$ eselect fontconfig list | grep bitmaps
[38] 70-no-bitmaps.conf
[39] 70-yes-bitmaps.conf
$ sudo eselect fontconfig enable 38
$ eselect fontconfig list | grep bitmaps
[38] 70-no-bitmaps.conf *
[39] 70-yes-bitmaps.conf
|
That does the trick without any extra files. |
|
Back to top |
|
|
|