<p>This question is a little old, so here goes an <em>updated</em> answer.</p>

<p>You should take a look into this paper <a href="https://arxiv.org/pdf/1507.03196v1.pdf" rel="nofollow noreferrer">DeepFont: Identify Your Font from An Image</a>. Basically it's a neural network trained on tons of images. It was presented commercially in <a href="https://www.youtube.com/watch?v=5eJ3IXYcw3M" rel="nofollow noreferrer">this video</a>.</p>

<p>Unfortunately, there is no code available. However, there is an independent  implementation available <a href="https://github.com/robinreni96/Font_Recognition-DeepFont" rel="nofollow noreferrer">here</a>. You'll need to train it yourself, since weights are not provided, but the code is really easy to follow. In addition to this, consider that this implementation is only for a few fonts.</p>

<p>There is also a link to the dataset and a repo to generate more data.</p>

<p>Hope it helps.</p>
Automatic font recognition with Python
<p>As you may have heard of, there is an online font recognition service call WhatTheFont</p>

<p>I'm curious about the tech behind this tool. I think basically we can seperate this into two parts:</p>

<ol>
<li><p>Generate images from font files of various format, refer to <a href="http://www.fileinfo.com/filetypes/font" rel="noreferrer">http://www.fileinfo.com/filetypes/font</a> for a list of font file extensions.</p></li>
<li><p>Compare submitted image with all generated images</p></li>
</ol>

<p>I appreciate you share some advice or python code to implement two steps above.</p>