From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: Rendering pi more nicely in PDF
Date: Wed, 29 Apr 2020 17:23:31 -0400
Message-ID: <20200429212331.GA13762@alvherre.pgsql> (raw)
In-Reply-To: <f58a0973-6e06-65de-8fb8-b3b93518bc6e@2ndquadrant.com>
On 2020-Apr-29, Peter Eisentraut wrote:
> To use a different font, you have to (a) pick one, and (b) install it
> locally when you build the PDFs.
>
> My proposal is to use the DejaVu fonts, which are open source and easily
> available for common operating systems. (Arguably, they also give the
> documentation a slightly fresher look.)
>
> The attached patch implements this. You just have to install the fonts
> somehow. Red Hat and Debian should have packages for this. We should write
> instructions for this in any case.
It's not easy to build the PDF with this. There's a stray > in fop.xml.
After fixing that, I get a warning about fontbox java lib not being installed.
OK, I can install libfontbox-java and that one disappears. Then there's
this other warning:
[warning] /usr/bin/fop: JVM flavor 'sun' not understood
which seems to be innocuous. The build it still dies because of a CFF
type1 something or other:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/fontbox/cff/CFFType1Font
at org.apache.fop.fonts.truetype.OTFFile.isType1(OTFFile.java:151)
After a quick search I found this bug
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584472
which suggests that I patch /usr/bin/fop to find_jars in "fontbox2"
instead of fontbox. OK, remove package libfontbox-java, patch the
script, try again. Now it seems to work, and the doc looks pretty.
But apparently it's not sufficient -- the new font is not used
everywhere. For example footnotes seem to use a different font than the
main body of text. (I altered the fontname to Gentium, which I like
better, and uses a different glyph for "g" which is easy to spot ... and
notably absent in footnote in page 5 under 1.4 Accessing a Database.)
I +1 the idea of using a more complete font if it means we can render
contributor names better, though :-)
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: alvherre@2ndquadrant.com, peter.eisentraut@2ndquadrant.com, tgl@sss.pgh.pa.us, pgsql-docs@lists.postgresql.org
Subject: Re: Rendering pi more nicely in PDF
In-Reply-To: <20200429212331.GA13762@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox