asciidoctor-fopub
asciidoctor-fopub copied to clipboard
Crashes on my MBP
See https://gist.github.com/paulrayner/6238049. I did a little searching - is this an old issue with lack of support for TrueType fonts in Fop? http://comments.gmane.org/gmane.text.xml.fop.devel/25483. I'm not sure why it needs TrueType fonts.
Ah. I enabled them to get Georgia for the headings to match the Asciidoctor styles. You can disable that scan by commenting out the related lines in the fop-config.xml file (look under src).
There is a cleaner way to do fonts. We can grab a Google Font or something & shove it into a directory & point fop at it. But start with disabling the font scan, and let it fall back to the default font.
Took me a while to get back to this. It worked! Thanks. Feels good to finally see the early draft of the entire book manuscript as a pdf. Excellent! :beer:
Great news!
The action item here is to either make the font configuration optional, activated by a command option, or be more surgical about what fonts are scanned. We really only need two.
Either would be fine. Simplest thing for now would be to disable the scan by default, and add a note in the README about how to add the scan if people want to use Georgia. That should work for everyone out of the box, right? After that, my vote would to only pull in the fonts needed, since that gives the best output.
Any news about this? I encountered the same issue today, with a fresh checkout of the project.
However, the solution hinted by @mojavelinux works: just edit src/dist/docbook-xsl/fop-config.xml
and remove or comment the following:
<fonts>
<auto-detect />
</fonts>
I'm running into the same issue, even after I've removed the <auto-detect />
lines. Here's my new fop-config.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<fop version="1.0">
<strict-configuration>true</strict-configuration>
<renderers>
<renderer mime="application/pdf">
</renderer>
</renderers>
</fop>
However it's still looking for and finding the TrueType fonts. Any ideas?
Also, running ./fopub my-file.xml
yields the following error message, even before all the Java nonsense:
sed: 1: "syntax.xml": unterminated substitute pattern
Not sure if it's related.
Is auto-detect
a boolean? Can you use a value of false
. I'm wondering if you are inheriting a configuration.
I tried
<?xml version="1.0" encoding="UTF-8"?>
<fop version="1.0">
<strict-configuration>true</strict-configuration>
<renderers>
<renderer mime="application/pdf">
<fonts>
<auto-detect>false</auto-detect>
</fonts>
</renderer>
</renderers>
</fop>
But nothing changed.