Using
measureText()
Measurements are all performed on this canvas object which should remain green: