I'm using Xfig to draw pictures and diagrams and I love it. But there's the problem, that the fonts are limited. How can I import new fonts into The Font Menu for Ghostscript fonts. Especially I want to use LinuxBiolinum and LinuxLibertine. I have it as ttf, otf and pfb. Where do I have to put these files so Xfig will recognize it as a new font. What I did so far was looking at the font.map file in usr/share/fonts/ghostscript. Then I changed the name of the LinuxBiolinum pfb file to the name which a font is using in the font.map file. When I use this font in Xfig, the LinuxBiolinum font shows up. But when I export to pdf or ps, the replaced font is still there.

Would be nice to get some ideas how to import new fonts in Xfig. I don't want to use the workaround with the PS/Latex export.

Greetings Michi

  • Export to tikz and use it? There is a direct exporter and a detour via SVG. Nov 21, 2019 at 18:48
  • /usr/share/fonts provides resources for the X-server. The fontmap used by ghostscript is located, e.g, in /usr/share/ghostscript/9.27/Resource/Init/Fontmap.GS. There one could sneak in, say LinuxBiolinum for AvantGarde-Book. But then, the process is that xfig calls fig2dev, which produces an eps file. The eps is then converted to pdf by ghostscript. The eps is quite readable, and maybe it is easier to replace the fonts in the eps file with a suitable sed-command, fig2dev -L eps try.fig | sed 's/AvantGarde-Book/LinBiolinumO/' >try.eps, where fc-match LinuxBiolinum postscriptname is useful.
    – tkl
    Nov 22, 2019 at 8:41
  • Ok I will try to replace the font in the eps file with the desired LinuxBiolinum. Thanks.
    – Michi
    Nov 22, 2019 at 14:22
  • I will try the tikz export too and give a feedback.
    – Michi
    Nov 22, 2019 at 14:24
  • I see now, that on my computer ghostscript does not find the font file. The directory to the font file must be given. To find the font path, e.g., fc-match LinuxBiolinum file is useful (or print both, fc-match LinuxBiolinum postscriptname file.) Provide the font path found from the command above to ghostscript (on my system): GS_FONTPATH=/usr/share/fonts/opentype/linux-libertine gs -sDEVICE=pdfwrite -dEPSCrop -o try.pdf try.eps.
    – tkl
    Nov 22, 2019 at 14:51


You must log in to answer this question.

Browse other questions tagged .