Please stop using "AI" to describe simple algorithms like this. This has nothing to do with the field of artificial intelligence. The code just extracts individual characters from the image and compares them visually to a prepared database of known fonts, using the hamming distance. You wouldn't call OCR an "AI algorithm", would you?
Edit: "nothing to do" is not accurate, but AI is definitely not an appropriate term to use here
Yes, I know it's a hard problem. Tesseract (the OCR library that is used in this project) is in development since 1985, but even google doesn't dare to call it an AI algorithm.
OCR is of course a part that is required to build an artificial intelligence, but the term "AI" is just to overused nowadays and calling every single algorithm capable of recognizing something in some data is poison to the field itself. Solving AI is a huuge and daring problem and we should use the term appropriately.
This is a canonical AI problem. This is a task usually performed by human beings that was found to be excellently performed by computers. It falls within the grand field of computer vision. It is a solved and trivial problem nowadays, but is sure is AI.