1 2 Previous Next 23 Replies Latest reply: Jan 8, 2014 2:20 PM by Kurt Lang
Dan Hinckley Level 1 Level 1 (0 points)

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
  • 1. Re: Adding fonts for PDF output
    Kurt Lang Level 7 Level 7 (31,990 points)

    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.

  • 2. Re: Adding fonts for PDF output
    Dan Hinckley Level 1 Level 1 (0 points)

    Kurt,

     

    I was hoping you'd spot this question!

     

    No joy I'm afraid. The PDF output from the GNUplot script doesn't find that font, though it does appear in my other applications (Mail, etc, BUT not in Word 2011 for Mac; go figure).

  • 3. Re: Adding fonts for PDF output
    Kurt Lang Level 7 Level 7 (31,990 points)

    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.

  • 4. Re: Adding fonts for PDF output
    Dan Hinckley Level 1 Level 1 (0 points)

    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.

     

    Screen shot 2013-03-19 at 17.42.58.png

  • 5. Re: Adding fonts for PDF output
    Kurt Lang Level 7 Level 7 (31,990 points)

    Hmm. Just for the heck of it, I saved out the font again, only this time as PostScript OpenType. Click on the link above to download it. I gave the new .zip file the same name, but now contains both the .ttf you grabbed before, and the new .otf version.

     

    Make sure to disable the .ttf version before loading the .otf font.

  • 6. Re: Adding fonts for PDF output
    Dan Hinckley Level 1 Level 1 (0 points)

    Kurt,

     

    Just to be sure, this link?

     

    http://www.jklstudios.com/misc/MoonPhases.zip

  • 7. Re: Adding fonts for PDF output
    Kurt Lang Level 7 Level 7 (31,990 points)

    Oops! Goofed. Yup, it's the same link as the one I embedded in the your other thread, not this one.

  • 8. Re: Adding fonts for PDF output
    Dan Hinckley Level 1 Level 1 (0 points)

    Kurt,

     

    Those fonts installed fine, but still no joy when outputting to PDF. 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.

     

    Regards,

     

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

  • 9. Re: Adding fonts for PDF output
    Kurt Lang Level 7 Level 7 (31,990 points)

    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.

  • 10. Re: Adding fonts for PDF output
    Kurt Lang Level 7 Level 7 (31,990 points)

    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.

  • 11. Re: Adding fonts for PDF output
    Dan Hinckley Level 1 Level 1 (0 points)

    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!

  • 12. Re: Adding fonts for PDF output
    Kurt Lang Level 7 Level 7 (31,990 points)

    GNUplot is a *nix command line graphing program

    Ah! So the PDF output has to also be through the Terminal. Hmm, one more try. Download the same .zip file of converted fonts. I added a Type 1 PS version to it.

  • 13. Re: Adding fonts for PDF output
    Dan Hinckley Level 1 Level 1 (0 points)

    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.

  • 14. Re: Adding fonts for PDF output
    Kurt Lang Level 7 Level 7 (31,990 points)

    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.

1 2 Previous Next