Skip to content

Instantly share code, notes, and snippets.

@typemytype
Created December 10, 2014 20:48
Show Gist options
  • Save typemytype/eb302ad37fe170386893 to your computer and use it in GitHub Desktop.
Save typemytype/eb302ad37fe170386893 to your computer and use it in GitHub Desktop.
add a measurement line in RoboFont
from AppKit import NSPoint
from mojo.events import MeasurementTool
measurement = MeasurementTool.measurementClass()
measurement.startPoint = NSPoint(100, 100)
measurement.endPoint = NSPoint(200, 200)
g = CurrentGlyph()
g.naked().measurements.append(measurement)
g.update()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment