asciidoctor-fopub icon indicating copy to clipboard operation
asciidoctor-fopub copied to clipboard

Crashes on my MBP

Open paulrayner opened this issue 10 years ago • 9 comments

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.

paulrayner avatar Aug 15 '13 03:08 paulrayner

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.

mojavelinux avatar Aug 15 '13 17:08 mojavelinux

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:

paulrayner avatar Aug 29 '13 00:08 paulrayner

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.

mojavelinux avatar Aug 29 '13 21:08 mojavelinux

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.

paulrayner avatar Aug 29 '13 21:08 paulrayner

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>

PaulMougel avatar Apr 11 '14 08:04 PaulMougel

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?

gibiansky avatar Aug 19 '14 23:08 gibiansky

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.

gibiansky avatar Aug 19 '14 23:08 gibiansky

Is auto-detect a boolean? Can you use a value of false. I'm wondering if you are inheriting a configuration.

mojavelinux avatar Aug 20 '14 07:08 mojavelinux

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.

gibiansky avatar Aug 20 '14 17:08 gibiansky