LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Adding fonts to Ghostscript for printing (https://www.linuxquestions.org/questions/linux-software-2/adding-fonts-to-ghostscript-for-printing-4175455946/)

MensaWater 03-28-2013 03:27 PM

Adding fonts to Ghostscript for printing
 
I’ll admit I’m not an expert in (or any level of user really) of Ghostscript myself.

We have a binary that is apparently looking for a font: n019003l.pfb

I found that font file does actually exist on my RHEL5 systems in two different locations:
-rw-r--r-- 1 root root 101436 Jul 12 2006 /usr/share/fonts/default/Type1/n019003l.pfb
-rw-r--r-- 1 root root 36026 Apr 24 2009 /usr/share/libwmf/fonts/n019003l.pfb

If I run gs –h as mentioned by man page it shows “search path” includes the first directory above but not the second one.

I see information in the man page about using GS_FONTPATH variable to set the directories but have read various sites online (this means I HAVE done a Google search so please don’t suggest one) that make it appear this isn’t always reliable. Setting the GS_FONTPATH does not change the output of gs –h and from what I’ve read I think what is output by gs –h is what it knew when Ghostscript was compiled.

Since I don’t actually run the binary myself I’m just interested in finding some way to validate the font from second path is available to ghostscript if I add it somehow.

I’ve looked at the Init files but quite frankly don’t understand them.

So my questions:
1) How can I be sure that Ghostscript is using the second path if I’ve added it to GS_FONTPATH?
2) Is there a better way to make the second path available to Ghostscript than GS_FONTPATH? (e.g. I see mention of –I flag and also discussion of adding fonts to Init files but what I’ve found mentions commands I don’t have.)
3) Is it possible the font in the first directory has what is in the second directory given that it is so much larger? (The dates shown are on the files as installed from rpm’s so don’t reflect when they were actually installed on the system.)

I am of course asking the person doing the work on the application to discuss with the vendor that made it so please don’t suggest we push back to the vendor. I’m simply trying to get alternate information as I suspect the issue may be they need the font in the second path rather than the one in the first path so wanted to see if there is any direction on how to tell ghostscript to use that and verify it is in fact using it.

My reason for thinking he needs the second path is that I ran a cksum on it and found it is exactly the same as the font of the same name that I found in gs –h output on an HP-UX server that previously ran the application. (Please don’t mention md5sum – I know about it but it isn’t available on the older HP-UX system and I’m not trying to validate security of the application but rather simply its cksum/size.)

bigrigdriver 03-29-2013 08:34 AM

Sounds like you are editing the wrong file to get ghostscript to use fonts. Look in /usr/share/ghostscript (the exact location in the directory tree will vary among distributions). Look for Fontmap.GS. That's the file to edit. The entries must follow a particular format which should be evident when you see the file.

Making Fonts Available To Ghostscript : Font HowTo


All times are GMT -5. The time now is 05:47 PM.