Patent attributes
Methods and apparatus, including computer program products, that implement a method for determining a winding order for a glyph associated with a font. The glyph has an outline that has an outside path. In one aspect, a method includes identifying four extrema points of the outline, each being an intersection of two vectors obtained from the outline; and for each of the points, calculating a cross product of the two vectors intersecting at the point. A positive result indicates that the outside path is wound in a first direction, and a negative result indicates that the outside path is wound in an opposite, second direction. The winding order of the outside path is determined based on the cross products calculated. In a particular implementation, the method determines that the outside path is wound counter clockwise when three or four of the results are positive.