Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Adding fonts for PDF output

I am running GNUplot scripts which produce PDF output files, using the pdflib installed via MacPorts.


"

pdflib @7.0.5_1+universal (active)
"


I've added a symbols font called MoonPhases.ttf to the fontbook.


The GNUplot Acqua terminal finds those fonts but the PDF lib does not. I have set an explicit "set fontpath "/Users/house/Library/Fonts/MoonPhases.ttf" with no luck.


GNUplot's "show fontpath" displays:


"system fontpath is "/System/Library/Fonts" "/Library/Fonts" "/Users/house/Library/Fonts"" so it does know where to look.


Can anyone offer advice about how to make that TTF font available to the PDFlib?

iMac, Mac OS X (10.6.8), iMac 24" 2.8 ghz 4 GB RAM

Posted on Mar 19, 2013 5:06 AM

Reply
23 replies

Mar 19, 2013 6:15 AM in response to Dan Hinckley

Hi Dan,


Are you using Font Book? If so, the first time you tried to add the Moon Phases font (the damaged one), may have toasted FB's database, preventing the corrected font from showing up in all apps.


You can try clearing Font Book's database and see if that helps.


Restart your Mac and immediately hold down the Shift key when you hear the startup chime to boot into Safe Mode. Keep holding the Shift key until you see a progress bar towards the bottom of the screen. You can let go of the Shift key at that point.


OS X asks you to log in (you will get this screen on a Safe Mode boot even if your Mac is set to automatically log in). Let the Mac finish booting to the desktop and then restart normally. This will clear Font Book's database and the cache files of the user account you logged into in Safe Mode.

Mar 19, 2013 8:44 AM in response to Dan Hinckley

Do you have that font only in the Fonts folder of your user account? Just making sure you haven't created a font conflict by putting a copy of the font in more than one active folder.


Also, you note one of the paths as:


/Users/house/Library/Fonts


I presume "house" isn't actually the short name of your user account and you're just using that word as a place holder for these forums? Of course, it could be house, but I'm assuming you were referring to the picture of the house OS X shows for the currently logged in account.


You might also want to try removing all font cache files. I'm not really expecting it to help, but it can't hurt to try.


Close all running applications. From an administrator account, open the Terminal app and enter the following command. You can also copy/paste it from here into the Terminal window:


sudo atsutil databases -remove


Terminal will then ask for your admin password. As you type, it will not show anything, so be sure to enter it correctly.


This removes all font cache files. Both for the system and the current user font cache files. After running the command, close Terminal and immediately restart your Mac.

Mar 19, 2013 10:05 AM in response to Kurt Lang

Kurt,


Moon Phases only appears once in FB I think; there is no warning about it being a duplicate; see screen capture of the FB collections - I have no idea if that is normal and have never tinkered with FB at all.


That font is only located in the ""/Users/house/Library/Fonts/" folder.


Did all your suggestions above, and still no joy.


GNUplot is a command-line Unix program, and apparently relies on a library called PDFlib.


User uploaded file

Mar 20, 2013 6:20 AM in response to Dan Hinckley

Can, or should, one keep both the .ttf and .otf versions enabled in FB?

No, that would create a font conflict. The only difference between them is the file format they're written in. They have the same internal names, so can't be used at the same time.

I fear I need somehow to tell PDFlib how to access them, or build it with them included but have had no luck so far on finding instructions for doing so.

I don't get it, either. There's nothing wrong with the rebuilt font. It should work.

Mar 20, 2013 7:35 AM in response to Dan Hinckley

Hi Dan,


I looked through the document a bit. It is indeed really involved. You almost need to be a programmer to understand some of the things you need to do to point it to the fonts you want to use. Much harder than it should be.


Is what you're outputting too complex to just create the PDF out of OS X? For instance, if you're in TextEdit and use the Print command, you can go to the lower left of the print dialogue, click PDF and then Save as PDF.


OS X's built in PDF creator really butchers images, but works fine for text.

Mar 20, 2013 10:01 AM in response to Kurt Lang

GNUplot is a *nix command line graphing program which will output to many different "terminals": PDF, LaTex, PS, EPS, etc. but I am pretty sure it does it via the PDFlib and not via OSX's own PDF engine.


I think I'll have to look at the PS output to see if it is easier to handle non-standard fonts and perhaps do some digging in a Unix forum or two.


An example of what I'm doing is here:


http://suiattle.net/transfers/March-2013.pdf


Thanks for all your help!

Mar 20, 2013 7:51 PM in response to Kurt Lang

Hmnn, for the moment, no apparent improvement; perhaps I need to re-start. The man page from gnuplot for the postscript terminal is here:


http://suiattle.net/transfers/gnuplot-ps-man-page.rtf


and the setup line I used in GNUplot is:


"set terminal postscript enhanced landscape eps fontfile add "MoonPhaReg.pfa""


having added that .pfa extension myself.

Mar 21, 2013 6:05 AM in response to Dan Hinckley

having added that .pfa extension myself.

That might work. This is all really weird. The manual states you can use any TrueType, OpenType or Type 1 PS font without modification, yet none of them have worked for you. A .pfa font is a UNIX/Linux version of a PS font (the binary outline portion).


Download the .zip file one more time, I've added a UNIX .pfa version to it.

Adding fonts for PDF output

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.