I do not have a sample code for you, but I think so.
You need to determine or get a bezier path that describes the shape of each letter - it will be the outline of a solid letter, and not just the line that draws the shape of the letter. There may be a way to get this from the api by getting the bezier path from the glyph, or you may have to design them yourself.
Then you need to scale the bezier path, so it is about the same size as the picture on the screen.
Then check how many of the points in the drawn path fall into the standard glyph. If it exceeds a certain threshold, you can consider it a successful draw.
It is assumed that you asked the user to draw A, and you are checking this path. If you are trying to figure out what they painted without any changes, you need a handwriting recognition library, try finding one of them.
source share