Modeling Medieval Handwriting: A New Approach to Digital Palaeography