StemHist error



  • Running:

    from mojo.compile import *
    
    stemHist(CurrentFont().path)
    

    Produces:

    Traceback (most recent call last):
      File '<untitled>', line 3, in <module>
      File 'mojo/compile.pyc', line 57, in stemHist
    TypeError: autohint() got an unexpected keyword argument 'useCurves'
    

    Not sure if I'm doing it wrong but it seems to want a file path?
    There's also a typo in the docs. stemHist is documented as having a userCurves kwarg.


  • admin

    oh, oeps, idd typo, it was redirecting to autoHint instead of stemHist… (will be fixed in the next update)

    stemHist takes a binary path as argument.

    and has optional arguments:

    • useCurves=bool: Include stems formed by curved line segments; by default, includes
      only stems formed by straight line segments.

    • blueZones=bool: Return alignment zone report rather than stem report

    this is a Adobe FDK tool.

    The mojo module is just a collection of useful internal modules. You can also use this:

    from lib.tools.compileTools import stemHist
    
    print stemHist("binaryPath.otf", useCurves=True, blueZones=False)
    

    good luck