pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-docs@lists.postgresql.org
Subject: Re: Rendering pi more nicely in PDF
Date: Wed, 29 Apr 2020 20:59:07 +0200
Message-ID: <f58a0973-6e06-65de-8fb8-b3b93518bc6e@2ndquadrant.com> (raw)
In-Reply-To: <10598.1587928415@sss.pgh.pa.us>
References: <10598.1587928415@sss.pgh.pa.us>

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

Attachments:

  0001-FOP-font-configuration.patch (text/plain, 0B) download

view thread (11+ messages)  latest in thread

Message-ID: <f58a0973-6e06-65de-8fb8-b3b93518bc6e@2ndquadrant.com>
Permalink:  ../f58a0973-6e06-65de-8fb8-b3b93518bc6e@2ndquadrant.com/
Also on:    postgresql.org/message-id/f58a0973-6e06-65de-8fb8-b3b93518bc6e@2ndquadrant.com

 ·  · 

reply

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: 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: <f58a0973-6e06-65de-8fb8-b3b93518bc6e@2ndquadrant.com>

* 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