6. A computer program product encoding instructions, which when executed on a computer causes the computer to perform the method of claim 1 .
1. A method comprising: receiving a query string; generating a plurality of computer-generated image based on the query string, each of the plurality of computer-generated images being generated in a different one of a set of selected fonts, the set of fonts having been identified based on a precision of the set of fonts for retrieving word images which match at least one selected query string; training a model based on the computer generated images; scoring candidate handwritten word images of a collection of handwritten word images using the trained model; and based on the scores, identifying a subset of the word images.