1
votes

I need to use a symbol font called Moon Fonts TTF in the PDF output from GNUplot. GNUplot finds it with no problem in the Aqua terminal.

I've tried:

set fontpath "/Users/house/Library/Fonts/MoonPhases.ttf"

and other add font suggestions from the gnuplot help pages with no luck.

I have also tried a series of .ttf, .otf, postscript and unicode-mapped fonts with some support from a typography expert, with no luck at all: pdfcairo, postscript or epscairo cannot seem to find it.

GNUplot's 'show fontpath' gives:

system fontpath is "/System/Library/Fonts" "/Library/Fonts" "/Users/house/Library/Fonts"

and the fonts are there in one of those paths. I also tried placing them directly in GN's working directory.

If anyone has suggestions about how to make this work it would be much appreciated.

OSX Snow Leopard
GNUplot 4.6.1

1
Probably fontpath should be the directory, the actual font is "font" or "fontname". Just a bit of a WAG based on the postscript driver - i dont know if pdfcairo is the same or not. - agentp
Show fontpath, before doing a set fontpath is: system fontpath is "/System/Library/Fonts" "/Library/Fonts" "/Users/house/Library/Fonts" so that director is already available to GNUplot. - Dan

1 Answers

1
votes

I have gnuplot installed via MacPorts. The folder /opt/local/etc/fonts contains the file fonts.conf. In there you'll find a section "Font directory list". However, even though ~/Library/Fonts is part of the gnuplot fontlist variable by default (and therefore aquaterm is able to use them), it is not listed in here (and therefore pdfcairo can't use them).

A quick fix is to create the following symbolic link:

cd ${HOME}
ln -s Library/Fonts .fonts

Then your pdfcairo output should pick up the fonts that are installed at the user level on your Mac. I have tested this with gnuplot 4.6 on Mavericks (10.9.5), and it seems to work fine.