Psconvert PDF - Custom font

Hello all,

I am trying to convert my .ps file to pdf. I would like to use a custom font ‘Optima’. I managed to install this font in the GMT, and it works in the .ps file. However, when I am converting the .ps to .pdf, the font does not appear in the PDF. How can I resolve this font issue. Do I have to install the custom font in GhostScript or Adobe

I use the command psconvert -A -Tf

I assume ghostscript needs to be told where those fonts of yours are hiding. Try to export the directory with your fonts via export GS_FONTPATH=yourfullpath.

Thanks for the suggestion. I copied the Optima font (.pfb, .afm and .pfm) in the $home/ghostscript/9.53.3/share/ghostscript/fonts and set the path to the directory. But, during the psconvert, I find that the GMT is unable to use this font. Please can you suggest how I get GMT to use Optima font in the final pdf.

Thank you.

You need to tell us what the error messages are. Run the psconvert command with -Vd and post the result. See example 31 for a successful use of custom-supplied fonts.

Many thanks for the suggestion. The command worked.
gmt psconvert -A -C-sFONTPATH=\usr\font\custom-dir -Tf

This worked for me, although I’ve used the custom font (Roboto) for different commands (text and legend). Also, error messages still haunted me (“Representation of font type not recognized. Using default.”) but everything worked well. Even used custom color and background color for the text.