Modelling Visual Appearance of Handwriting