I've been using Bera Sans for years and I've been adding it to ghostscript by copying files into the ghostscript directory and hacking a Fontmap file. I upgraded to Ubuntu 14.04, which has Ghostscript 9.10, and this process is not working the same as before.
I found /usr/share/ghostscript/9.10/Resrouce/Init/Fontmap.GS and I added
Code:
/BeraSansMono-Bold (fvmb8a.pfb) ;
/BeraSansMono-BoldOb (fvmbo8a.pfb) ;
/BeraSansMono-Roman (fvmr8a.pfb) ;
/BeraSansMono-Oblique (fvmro8a.pfb) ;
/BeraSans-Bold (fvsb8a.pfb) ;
/BeraSans-BoldOblique (fvsbo8a.pfb) ;
/BeraSans-Roman (fvsr8a.pfb) ;
/BeraSans-Oblique (fvsro8a.pfb) ;
/BeraSerif-Roman (fver8a.pfb) ;
/BeraSerif-Bold (fveb8a.pfb) ;
to it but when I invoke ghostscript I get
Code:
Loading NimbusMonL-Bold font from /usr/share/fonts/type1/gsfonts/n022004l.pfb... 3751484 2310262 3934520 2576164 1 done.
Can't find (or can't open) font file fvmr8a.pfb.
Can't find (or can't open) font file /usr/share/ghostscript/9.10/Resource/Font/BeraSansMono-Roman.
Can't find (or can't open) font file BeraSansMono-Roman.
Querying operating system for font files...
The file it's looking for, fvmr8a.pfb, is located at
/usr/share/fonts/type1/gsfonts/fvmr8a.pfb, the same place it finds NimbusMonL_Bold. I don't know what the other font file it's trying to find is, the "BeraSansMono-Roman" file.
It says "Querying operating system for font files" but it doesn't actually succeed. It actually hangs my system for a while and then I get
Code:
Querying operating system for font files...
Error: /typecheck in /findfont
Operand stack:
fontdict BeraSansMono-Roman
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1916 1 3 %oparray_pop 1915 1 3 %oparray_pop 1899 1 3 %oparray_pop 1787 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- 1868 2 3 %oparray_pop
Dictionary stack:
--dict:1171/1684(ro)(G)-- --dict:0/20(G)-- --dict:110/200(L)--
Current allocation mode is local
Current file position is 10743
GPL Ghostscript 9.10: Unrecoverable error, exit code 1
Now having to copy files into the directory structure of ghostscript is obviously a hack. It's annoying to have to do this every time ghostscript upgrades. Can anybody tell me if there is a good way to make the font available to ghostscript?
Failing that, can anybody tell me how to copy the files with this new version of ghostscript so that it can find them?