fdkBridge

This module is the bridge between Python and the FDK. It uses subprocess.Popen to create a process that executes an FDK program.

ufo2fdk.fdkBridge.haveFDK()

This will return a bool indicating if the FDK can be found. It searches for the FDK by using which to find the commandline makeotf, checkoutlines and autohint programs. If one of those cannot be found, this FDK is considered to be unavailable.

ufo2fdk.fdkBridge.makeotf(outputPath, outlineSourcePath=None, featuresPath=None, glyphOrderPath=None, menuNamePath=None, fontInfoPath=None, releaseMode=False)

Run makeotf. The arguments will be converted into arguments for makeotf as follows:

outputPath -o
outlineSourcePath -f
featuresPath -ff
glyphOrderPath -gf
menuNamePath -mf
fontInfoPath -fi
releaseMode -r
ufo2fdk.fdkBridge.checkOutlines(fontPath, removeOverlap=True, correctContourDirection=True)

Run checkOutlines. The arguments will be converted into arguments for checkOutlines as follows:

The following arguments will be passed to autohint.

removeOverlap=False -V
correctContourDirection=False -O

Additionally, the following arguments will be passed to checkOutlines.

  • -e
  • -k
ufo2fdk.fdkBridge.autohint(fontPath)

Run autohint. The following arguments will be passed to autohint.

  • -nb
  • -a
  • -r
  • -q