Reputation: 518
When building ghostscript from scratch, without compiling in in the fonts / resources, etc., it is fairly straightfoward to add a font - you simply edit the Fontmap.GS and add the appropriate .pfa, .pfb, and .afm files to ghostscript's installation font folder.
Ghostscript allows you to build an 'embedded' version of it, where the fonts, etc. and compiled right into the executable.
My question is, how do you add a font to the source tree such that the new font will be embedded along with the default ones?
I tried modifying the Fontmap.gs in the Resource/Init source folder, but the resulting gs executable didn't have the font I wanted to add.
Upvotes: 0
Views: 363
Reputation: 31159
In addition to adding the font to the font map, you will need to put the font file somewhere in ghostpdl/Resource, normally in the Font sub-folder.
Ghostscript doesn't need, and isn't interested in, .afm files by the way.
The ROM File system is built by the mkromfs tool, so you can debug that to see what's going on. Eventually that should produce a C file called gsromfs1.c which you can open and read. You won't find it terribly interesting, but there are comments which include the filename of all the files which are embedded in there.
If you still can't get that to work we will need considerably more information; a copy of the modified font map, the name of the font file, and its type, the location where you are storing it, what platform you are using and the make invocation you are using.
You are also using a somewhat out of date version of Ghostscript, the current version is 9.19.
Upvotes: 1