15. A computer-implemented method comprising: synthesizing, by a computing device, a test image comprising text by introducing variances, the variances including one or more of character spacing, noise, shading, affine transformation, compression artifacts, aspect ratio, or Gaussian blurring; cropping, by the computing device, a plurality of test image patches from the test image; inputting, by the computing device, each test image patch of the plurality of test image patches to a convolutional neural network (CNN) that has been trained with a plurality of training image patches; obtaining, by the computing device, a test output for each test image patch of the plurality of test image patches, wherein the test output includes one or more dimensions; performing, by the computing device, a max operation along each of the one or more dimensions of the test output, a result of the max operation being a feature representation for the test image; and determining, by the computing device, a font similarity for the test image.
18. The method of claim 15 , further comprising building a font similarity graph for a collection of fonts based on the font similarity for the test image.