mojo.tools

GN2UV

UV2GN

registerFileExtension(fileExtension)

Register a file extension, and set RoboFont as the default application to open it.

IntersectGlyphWithLine(glyph, line, canHaveComponent=False, addSideBearings=False)

Intersect a glyph with a line. Returns a list of intersections.

IntersectGlyphWithLine(myGlyph, ((100, 50), (800, 50)), canHaveComponent=True, addSideBearings=True)

union(glyph, subjectContours, clipContours, roundCoordinates=None)

Draw the union between subjectContours and clipContours into the destination glyph.

union(glyph, subjectContours, clipContours, roundCoordinates=None)

Both subjectContours and clipContours can be a list of contour objects or a glyph object.

If roundCoordinates is None, the default rounding value in the Preferences will be used.

difference(glyph, subjectContours, clipContours, roundCoordinates=None)

Draw the difference between subjectContours and clipContours into the destination glyph.

difference(glyph, subjectContours, clipContours, roundCoordinates=None)

Both subjectContours and clipContours can be a list of contour objects or a glyph object.

If roundCoordinates is None, the default rounding value in the Preferences will be used.

intersection(glyph, subjectContours, clipContours, roundCoordinates=None)

Draw the intersection between subjectContours and clipContours into the destination glyph.

intersection(glyph, subjectContours, clipContours, roundCoordinates=None)

Both subjectContours and clipContours can be a list of contour objects or a glyph object.

If roundCoordinates is None, the default rounding value in the Preferences will be used.

xor(glyph, subjectContours, clipContours, roundCoordinates=None)

Draw the exclusive or (XOR) between subjectContours and clipContours into the destination glyph.

xor(glyph, subjectContours, clipContours, roundCoordinates=None)

Both subjectContours and clipContours can be a list of contour objects or a glyph object.

If roundCoordinates is None, the default rounding value in the Preferences will be used.

unicodeToChar(uni)

Convert unicode value to character. Supports big unicodes.

charToUnicode(char)

Convert character to unicode value. Supports big unicodes.

walkDirectoryForFile(dir, ext='.py')

Walk a given folder recursively and collect the paths of all files with a given extension ext.

imagePNGData(path)

Return png data from a path to an image file.

roboFontUnitTest(classes=[], modules=[])

Perform a unit test inside RoboFont.

Optionally, provide a list of classes or a list of module paths to run the test on.

class BooleanGlyph()

A glyph-like object that can be used for handling boolean operations with glyph contours.

union

result = BooleanGlyph(glyph) + BooleanGlyph(glyph2)
# or
result = BooleanGlyph(glyph) | BooleanGlyph(glyph2)

difference

result = BooleanGlyph(glyph) - BooleanGlyph(glyph2)

intersection

result = BooleanGlyph(glyph) & BooleanGlyph(glyph2)

xor

result = BooleanGlyph(glyph) ^ BooleanGlyph(glyph2)
Inherits from subclass: mojo.tools.BooleanGlyph

class RoboFontError()

Common base class for all non-exit exceptions.

class CallbackWrapper()

A wrapper for an NSCallback to a normal Python object.

action_()

doubleAction_()

Inherits from subclass: builtins.objc.objc_class

class nsCallbackWrapper()

A wrapper for an NSObject callback.

action(sender)

Last edited on 28/05/2020