
Typefont – An algorithm to recognize the font of a text in a photo - rendernos
https://github.com/Sirvasile/Typefont
======
Bluestrike2
It's a neat implementation for a _very_ annoying (and common) scenario. I've
used various font ID tools in the past and always found them rather limited.
The vast majority are manual ones that ask you to identify particular
characteristics of the font in question and then go from there. While that
might be helpful, it's also pretty limited. Most of the time, I wound up
posting an image to a typography forum to get an ID.

A few sites like My Fonts have an API that lets you generate font samples.[0]
You could probably use that to automate generating your font database. Throw
in a few other APIs (Google Fonts[1], Typekit[2], etc.) and some other type
stores--along with some of the foundry websites that don't sell their fonts on
other sites (Hoefler & Co., cough)--and you could build up a _very_ rigorous
database/recognition tool in short order.

0\.
[https://dev.myfonts.com/#font_sample](https://dev.myfonts.com/#font_sample)

1\.
[https://developers.google.com/fonts/docs/developer_api](https://developers.google.com/fonts/docs/developer_api)

2\.
[https://www.adobe.io/apis/creativecloud/typekit/docs/overvie...](https://www.adobe.io/apis/creativecloud/typekit/docs/overview.html)

------
mrspeaker
My Fonts had a tool for doing this back in (at least) 2009... I remember
because I tried to run the burning "NERDS" sign from "Revenge of the nerds"
through it. Didn't work very well though: I had to resort to human
intervention. [http://www.mrspeaker.net/2009/01/21/revenge-of-the-font-
nerd...](http://www.mrspeaker.net/2009/01/21/revenge-of-the-font-nerds/)

Keen for an online version of this project so I can see if it fares any
better!

------
rendernos
I changed the description of the repository and removed the AI tag, thank you
and don't be evil!

------
nom
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

~~~
keppanaviimen
"The code just extracts" please. Do you think extracting letters from a image
is a joke? There is a engine in development since 1985 for doing that.
[http://www.kloover.com/publications/Kluever_-
_OCR_using_ANN....](http://www.kloover.com/publications/Kluever_-
_OCR_using_ANN.pdf)

~~~
nom
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.

------
stevehiehn
This problem is nice because unlike other datasets i think you could automate
the creation of the data. I'm thinking you could generate a couple million
photos with text captions all with known fonts.

------
aamederen
Can this technique be used for recognizing handwriting of individuals?

~~~
rsrsrs86
Yes. You wouldn't need to worry about breaking it down to individual letters,
though. Not necessarily. You would need pages and pages of writing from the
individuals.

------
Sujan
Nice project, but:

> An artificial intelligence [...]

Really?

~~~
rendernos
The term "artificial intelligence" is applied when a machine mimics
"cognitive" functions that humans associate with other human minds.
Understanding the shape in a image, reading the text from a photo can also be
considered AI.

~~~
nom
Extracting characters from an image and comparing them to a database of known
fonts using a naive distance metric can be called AI? Really?

------
mrcactu5
this is amazing ... how is this even possible?

