Convert PFB/PFM font to OTF on Ubuntu

  • install fontforge with Synaptic
  • create pfb2otf
#!/usr/bin/fontforge
Open($1);
Reencode("unicode");
Generate($fontname+".otf");
Quit(0);
  • create convert
#!/bin/bash

PATH=/usr/local/bin:$PATH
FONTFORGE_LANGUAGE=ff
export PATH FONTFORGE_LANGUAGE

if (test -f $1); then ./pfb2otf $1; fi
  • make them executable:
chmod 755 pfb2otf convert
  • place them in the same folder as your PFB and PFM font files
  • launch the conversion
for i in *.[pP][fF][bB]; do ./convert $i; done

Reference

 

Feedback

is doable in OS X ?
le fleuff
October 24, 2009
#1