FONTNET: On-Device Font Understanding and Prediction Pipeline

Fonts are one of the most basic and core design concepts. Numerous use casescan benefit from an in depth understanding of Fonts such as Text Customizationwhich can change text in an image while maintaining the Font attributes likestyle, color, size. Currently, Text recognition solutions can group recognizedtext based on line breaks or paragraph breaks, if the Font attributes are knownmultiple text blocks can be combined based on context in a meaningful manner.In this paper, we propose two engines: Font Detection Engine, which identifiesthe font style, color and size attributes of text in an image and a FontPrediction Engine, which predicts similar fonts for a query font. Majorcontributions of this paper are three-fold: First, we developed a novel CNNarchitecture for identifying font style of text in images. Second, we designeda novel algorithm for predicting similar fonts for a given query font. Third,we have optimized and deployed the entire engine On-Device which ensuresprivacy and improves latency in real time applications such as instantmessaging. We achieve a worst case On-Device inference time of 30ms and a modelsize of 4.5MB for both the engines.