1. A method for recognition of a handwritten character, which method comprises the steps of: determining a plurality of position features defining the handwritten character, and comparing the handwritten character to reference characters stored in a database in order to find the closest matching reference character, said step of comparing comprising the steps of: computing a difference between one of the plurality of position features of the handwritten character and a position feature of one of the reference characters, determining, by lookup in a predefined table, a distance measure based on the computed difference, repeating the steps of computing a difference and determining a distance measure for each of the plurality of position features of the handwritten character, and computing a cost function based on the determined distance measures.