1. A method for fitting text to one or more shapes in a graphic, the method comprising: defining one or more initial constraints and one or more constraint rules for fitting text to the shapes, the constraint rules and constraints being defined for each shape or for a set of shapes; applying the initial constraints to attempt to the shapes to fit text within the shapes; detecting that the text did not fit within one or more of the shapes; in response to detecting that the text did not fit, applying the constraint rules to modify one or more of the constraints; and reapplying the constraints to one or more of the shapes to create a new layout for the graphic.