1. A method of forming a photomask, comprising: receiving a layout of an integrated circuit (IC) device, wherein the layout has a curvilinear feature; providing a template library having a plurality of parameterized shape elements; classifying the curvilinear feature by selecting at least one of the parameterized shape elements that defines the curvilinear feature and forming a template index associated with the layout that includes the selected parameterized shape element; sending the template index and the layout to a mask writer; and using the template index and the layout to fabricate a pattern on a photomask.