Re: Rendering pi more nicely in PDF

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: Rendering pi more nicely in PDF
Date: 2020-04-29 18:59:07
Message-ID: f58a0973-6e06-65de-8fb8-b3b93518bc6e@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On 2020-04-26 21:13, Tom Lane wrote:
> "&pi;" renders poorly in our PDF docs: as shown in the attached
> screenshot, it doesn't line up on the baseline. I realized that
> this is the same problem I'd run into recently with right-arrow,
> and it can be solved in the same way, namely we have to specify
> use of the symbol font explicitly. So attached is a proposed
> patch to fix it.

The real problem here is that the default font (Times or Times New
Roman) embedded in PDF readers doesn't have these off-the-beaten-path
glyphs. I'm surprised you see anything at all. The fix is to use a
different font with more glyphs. I looked into that some time ago
because this also effects the contributors list in the release notes,
which has to be dumbed down because of this.

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.

(With this you can undo the other patches discussed here and just write
&pi; and it should look correctly.)

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
0001-FOP-font-configuration.patch text/plain 2.6 KB

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Peter Eisentraut 2020-04-29 19:08:24 Re: Documentation: 21.5. Default Roles
Previous Message Tom Lane 2020-04-29 18:35:15 Re: pg_restore dbname