1. A non-transitory machine readable medium storing a program which when executed by at least one processing unit aligns a symbol with an associated character, the program comprising sets of instructions for: projecting a set of lines from a first plurality of points on the character along a slope of the character; identifying a second plurality of points on the projected lines along a top of the character; generating an alignment shape surrounding the character based on the identified second plurality of points, the alignment shape comprising a plurality of sides; and aligning the associated symbol with the character along one of the plurality of sides of the alignment shape.