[reportlab-users] [Bitbucket] Issue #22: add '~/.fonts' (for user fonts on Ubuntu) to TTFSearchPath (rptlab/reportlab)

Marius Gedminas marius at gedmin.as
Mon Feb 24 17:40:07 EST 2014

On Mon, Feb 24, 2014 at 10:43:32AM +0000, Robin Becker wrote:

> On 22/02/2014 06:17, Ian Wood wrote:

> >--- you can reply above this line ---

> >

> >New issue 22: add '~/.fonts' (for user fonts on Ubuntu) to TTFSearchPath

> >https://bitbucket.org/rptlab/reportlab/issue/22/add-fonts-for-user-fonts-on-ubuntu-to

> >

> >Ian Wood:

> >

> >Probably could be in search paths for other types of font also..

> ...

> I am trying to avoid answering all these issues on bitbucket so I'm

> copying reportlab-users to give others a chance to weigh in.


> I have no particular feeling about this particular entry. Since

> python doesn't recognize the ~ as special just using that character

> would not work.


> The question sould probably be re-phrased as can you do add

> os.path.join(os.environ.get('HOME','/dev/null'),'.fonts') to one or

> more search paths?

os.path.expanduser is indeed the canonical solution for this.

> I'm not an expert at all the places where font paths can be

> specified; presumably there might be FONTPATH environment variables

> as well.

I believe the new standard is ~/.local/share/fonts/ [1] (where the
~/.local/share part can be overridden by the $XDG_DATA_HOME environment

[1] https://github.com/ValveSoftware/steam-for-linux/issues/2307
[2] http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

Marius Gedminas
I am right now in the process of reading the Xft source code (the suspense near
the end of Chapter 7 is unbearable) [...]
-- Juliusz Chroboczek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
Url : <http://two.pairlist.net/pipermail/reportlab-users/attachments/20140224/a5e16257/attachment.pgp>

More information about the reportlab-users mailing list