So i have a work around in place but at this point I'm just annoyed I can't figure out why this isn't working. I think I have read everything on fonts I can find but still at a bit of a loss. Would be very grateful if anyone has ideas. Here's the situation.
I have a bit of a custom linux system that is heavily based on RHEL5ish.
I have always used the statically linked binary up until v10. I also have whats appears to be a functional fontconfig setup though I currently am not using it for anything else. If I run fc-match -s 'serif' for instance it tells me "Tymes.ttf: "Tymes" "Regular"" which is correct and expected, which is why i THINK fontconfig is largely setup correctly though it has way too many config files to make me happy. I have 2 font bundles installed in /usr/local/lib/X11/fonts/ ttf-arkpandora-2.04 and ttf-bitstream-vera.
The reason the statically linked binary is important is that the fontconfig config it uses differs from my system such that prince has always reported a fontconfig error about missing default config. Which was fine because everything worked. This is due to the fact I modified /usr/local/lib/prince/style/fonts.css thusly
@font-face {
font-family: serif;
src: local("Times New Roman"), local("DejaVu Serif")
}
and later
/* Times New Roman, Regular */
@font-face {
font-family: "Times New Roman";
font-weight: normal;
font-style: normal;
font-stretch: normal;
src: url("/usr/local/lib/X11/fonts/ttf-arkpandora-2.04/Tymes.ttf")
}
This always worked fine as I said through 9 and xml using elemets that created pre tags would request the serif font and find Tymes.
So when I needed v10 I saw that the static binary was finally gone. So i grabbed the dynamic one. In general it runs with no obvious errors. However processing an xml file that works perfect with v9-static I get an error of
prince: internal error: no available fonts
If I run prince through strace I can see it is happily interacting with fontconfig but not finding the fonts.
The workaround is to change font-family serif to map directly to the font file. This works fine, but I can't let go of two things that confuse me.
1) why isn't fontconfig working. i would expect if fc-match can map serif and 'Times New Roman' both to Tymes.ttf everything should be working. Since fontconfig can be such a beast to get right I should ignore it but I'd love to understand whats wrong. Thoughts? I can't really tell how prince interacts with fontconfig if there are other methods to discover why it can't get from Times New Roman to Tymes.ttf using fontconfig.
2) I tried taking fontconfig out of the picture by moving the font config default configs assuming that would cause princexml to fall back to its previous v9-static behavior but that also isnt working as expected. I get the same "no available fonts" error, which suggests a change in v10 on how it processes the fonts.css file maybe? I'm surprised v9-static and v10-dynamic wouldn't work the same with fontconfig effectively out of the picture. So i'm also curious if anything changed in how fonts.css is processed between 9 and 10 or static and dynamic.
I have a bit of a custom linux system that is heavily based on RHEL5ish.
I have always used the statically linked binary up until v10. I also have whats appears to be a functional fontconfig setup though I currently am not using it for anything else. If I run fc-match -s 'serif' for instance it tells me "Tymes.ttf: "Tymes" "Regular"" which is correct and expected, which is why i THINK fontconfig is largely setup correctly though it has way too many config files to make me happy. I have 2 font bundles installed in /usr/local/lib/X11/fonts/ ttf-arkpandora-2.04 and ttf-bitstream-vera.
The reason the statically linked binary is important is that the fontconfig config it uses differs from my system such that prince has always reported a fontconfig error about missing default config. Which was fine because everything worked. This is due to the fact I modified /usr/local/lib/prince/style/fonts.css thusly
@font-face {
font-family: serif;
src: local("Times New Roman"), local("DejaVu Serif")
}
and later
/* Times New Roman, Regular */
@font-face {
font-family: "Times New Roman";
font-weight: normal;
font-style: normal;
font-stretch: normal;
src: url("/usr/local/lib/X11/fonts/ttf-arkpandora-2.04/Tymes.ttf")
}
This always worked fine as I said through 9 and xml using elemets that created pre tags would request the serif font and find Tymes.
So when I needed v10 I saw that the static binary was finally gone. So i grabbed the dynamic one. In general it runs with no obvious errors. However processing an xml file that works perfect with v9-static I get an error of
prince: internal error: no available fonts
If I run prince through strace I can see it is happily interacting with fontconfig but not finding the fonts.
The workaround is to change font-family serif to map directly to the font file. This works fine, but I can't let go of two things that confuse me.
1) why isn't fontconfig working. i would expect if fc-match can map serif and 'Times New Roman' both to Tymes.ttf everything should be working. Since fontconfig can be such a beast to get right I should ignore it but I'd love to understand whats wrong. Thoughts? I can't really tell how prince interacts with fontconfig if there are other methods to discover why it can't get from Times New Roman to Tymes.ttf using fontconfig.
2) I tried taking fontconfig out of the picture by moving the font config default configs assuming that would cause princexml to fall back to its previous v9-static behavior but that also isnt working as expected. I get the same "no available fonts" error, which suggests a change in v10 on how it processes the fonts.css file maybe? I'm surprised v9-static and v10-dynamic wouldn't work the same with fontconfig effectively out of the picture. So i'm also curious if anything changed in how fonts.css is processed between 9 and 10 or static and dynamic.